-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Enable unary elementwise inplace ops for all sparse compressed layouts. #85031
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
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/85031
Note: Links to docs will display an error until the docs builds have been completed. ✅ No Failures, 2 PendingAs of commit 926ec25: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Is it really necessary to turn on support for all zero preserving unary operators to resolve this? I don't think we have good tests for view semantics + autograd for sparse layouts. In particular I'm worried about transpose + . |
@cpuhrsch The question is OT because the unary operations that are affected here are element-wise operations such as I have updated the PR title but I think this has been confusing because of the naming of |
Ok, but the question still stands that this PR doesn't introduce tests for inplace unary ops for sparse compressed layouts. Do we have those somewhere, but they're just not enabled? |
The only place where the unary_inplace_op template is used is for |
The PR does not introduce the tests because these already exist (see test_sparse_csr_unary_inplace in test_sparse_csr.py), however, the tests are run on CSR samples only. Because the
Incorrect. The template is used for all unary elementwise ops that preserve zeros. In fact, after #85030, |
@pytorchbot merge this |
❌ 🤖 pytorchbot command failed:
Try |
@pytorchbot merge |
@pytorchbot successfully started a merge job. Check the current status here and land check progress here. |
…s. (#85031) Fixes #84998 Unblocks #84897 Pull Request resolved: #85031 Approved by: https://github.com/cpuhrsch
Fixes #84998
Unblocks #84897
Stack from ghstack (oldest at bottom):