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
sparse.mm.backward: fix for non-contiguous grad values on CPU #106127
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/106127
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 596c378: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ghstack-source-id: bfd5b612a65f91ef50a03bf35ad9d87aa8f9f3fc Pull Request resolved: #106127
…CPU" [ghstack-poisoned]
ghstack-source-id: 0763a7a1591633bb1f0af595610887b9070b9f9c Pull Request resolved: #106127
typename index_t_ptr::value_type Cp[], | ||
// NOLINTNEXTLINE(modernize-avoid-c-arrays,cppcoreguidelines-avoid-c-arrays) | ||
int64_t Cj[], | ||
typename index_t_ptr::value_type Cj[], | ||
// NOLINTNEXTLINE(modernize-avoid-c-arrays,cppcoreguidelines-avoid-c-arrays) | ||
scalar_t Cx[]) { | ||
typename scalar_t_ptr::value_type Cx[]) { |
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.
Let's probably not assume that C-arrays are always contiguous...
EDIT: not needed. This function is used in a single place, and only receives contiguous output.
ghstack-source-id: aaf13ecfaef31d33b6ff858985e692f3fc392907 Pull Request resolved: #106127
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.
Thank you @nikitaved!
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 0 checks: Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…h#106127) Fixes pytorch#102493. The problem was that the backward implementation assumed inputs to be contiguous. This might supersede pytorch#104520. Pull Request resolved: pytorch#106127 Approved by: https://github.com/cpuhrsch
Fixes #102493.
The problem was that the backward implementation assumed inputs to be contiguous.
This might supersede #104520.
Stack from ghstack (oldest at bottom):
cc @alexsamardzic @pearu @cpuhrsch @amjames @bhosmer @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10