-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spmm
and is_torch_sparse_tensor
#5906
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5906 +/- ##
==========================================
- Coverage 86.41% 84.41% -2.00%
==========================================
Files 349 351 +2
Lines 19507 19518 +11
==========================================
- Hits 16857 16477 -380
- Misses 2650 3041 +391
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
from torch_geometric.utils import is_torch_sparse_tensor | ||
|
||
|
||
def spmm(src: SparseTensor, other: Tensor, reduce: str = "sum") -> Tensor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this TorchScript compatible via the overload
decorator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure :)
Co-authored-by: Matthias Fey <[email protected]>
Thanks @rusty1s for the updates and making it merged :) |
This PR implements: + `spmm` function for both PyTorch and torch_sparse SparseTensor + `is_torch_sparse_tensor` function to check if a tensor is a PyTorch SparseTensor TODO: + Add test and docstring for `spmm` Any comments would be appreciated :) Co-authored-by: Matthias Fey <[email protected]>
This PR implements:
spmm
function for both PyTorch and torch_sparse SparseTensoris_torch_sparse_tensor
function to check if a tensor is a PyTorch SparseTensorTODO:
spmm
Any comments would be appreciated :)