-
Notifications
You must be signed in to change notification settings - Fork 25.7k
torch.sparse.softmax avoid div by zero and invalid kernel launch parameters #82149
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
🔗 Helpful links
✅ No Failures (0 Pending)As of commit 230c1ae (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
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.
LGTM
| auto nnz = values.size(0); | ||
| auto sizes = input.sizes(); | ||
| auto nvalues = values.numel() / nnz; | ||
| auto nvalues = get_nvalues(sizes, sparse_dim); |
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.
This is what the CPU kernel does.
|
@pytorchbot merge |
|
@pytorchbot successfully started a merge job. Check the current status here |
|
Hey @cpuhrsch. |
…meters (#82149) (#82149) Summary: ### Description Small changes needed to deal with nnz 0 inputs. ### Issue #82107 ### Testing Added additional test coverage to reproduce bug reported in issue. Tested resulting values by conversion `to_dense`. Pull Request resolved: #82149 Approved by: https://github.com/jbschlosser, https://github.com/ezyang Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/6ab1fe19eec0aa610bca6de881d373905da2fb37 Reviewed By: osalpekar Differential Revision: D38142983 Pulled By: cpuhrsch fbshipit-source-id: 3bab68a33d38100677accedbee875c967da80093
Description
Small changes needed to deal with nnz 0 inputs.
Issue
#82107
Testing
Added additional test coverage to reproduce bug reported in issue. Tested resulting values by conversion
to_dense.