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 torch.sparse overview section #85265
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/85265
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 Failures, 7 PendingAs of commit c71acbe: The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
docs/source/sparse.rst
Outdated
is in turn also backed and powered by sparse storage formats and kernels. | ||
|
||
Also note that, for now, the user doesn't have a choice of the output layout. For example, | ||
adding a sparse Tensor to a regular strided Tensor results in a sparse 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.
adding a sparse Tensor to a regular strided Tensor results in a sparse Tensor. | |
adding a sparse Tensor to a regular strided Tensor results in a strided 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.
Looks really good! Couple quick editorial comments (not typos etc), will come back for another pass 😁
/easycla As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details. This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign. |
docs/source/sparse.rst
Outdated
Unary functions | ||
--------------- | ||
|
||
All zero-preserving unary functions support sparse |
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.
All zero-preserving unary functions listed below support sparse...
or possibly
All zero-preserving unary functions will support sparse...
Some zero-preserving unary functions, such as reLU
, are not in fact supported, but the goal is to make sure they all are, so we might want the wording here to reflect that any missing zero-preserving unary function support is a reportable bug.
I also do not think this list is completely correct: torch.angle
does not appear to support COO. Also all layouts support torch.expm1
which is missing.
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.
I'll update the wording to say that all zero preserving unary functions can be supported and encourage the reader to open an issue if they find one that's missing. I think it's fair to say that they're pretty easily supported, so it's ok to encourage people to report it. What do you think?
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.
That sounds great. It is easy to add them so we should encourage people to point out missing ones.
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.
lg, added a handful of minor points
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.
thanks for addressing prior feedback
@pytorchbot merge -f "docs only" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Hey @cpuhrsch. |
The goal of this section is to provide a general overview of how PyTorch handles sparsity for readers who are already familiar with sparse matrices and their operators. Pull Request resolved: pytorch#85265 Approved by: https://github.com/jisaacso
The goal of this section is to provide a general overview of how PyTorch handles sparsity for readers who are already familiar with sparse matrices and their operators. Pull Request resolved: #85265 Approved by: https://github.com/jisaacso
The goal of this section is to provide a general overview of how PyTorch handles sparsity for readers who are already familiar with sparse matrices and their operators.