-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Reland: [Autograd] Use in-place input accumulation fast path for dense Tensors. #90217
Conversation
…e Tensors. Identical to #88339 except with a `.has_storage()` check before `.storage()`. Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/90217
Note: Links to docs will display an error until the docs builds have been completed. ❗ 2 Active SEVsThere are 2 currently active SEVs. If your PR is affected, please view them below: ❌ 6 FailuresAs of commit 7ffc90b: NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…e Tensors. Identical to #88339 except with a `.has_storage()` check before `.storage()`. Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/) ghstack-source-id: 175170552 Pull Request resolved: #90217
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.
Hope it sticks this time (which unfortunately is my comment on too many diffs)
buffer[pos] = old_var + var; | ||
} else if ( | ||
// ATen doesn't route sparse additions correctly... | ||
old_var.is_sparse() || old_var.is_sparse_csr()) { |
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.
cc @cpuhrsch what is the right way (and future proof way) to check if a Tensor is any sparse format?
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.
@albanD - a future proof catch-all is work in progress. Right now it's best to access the layout and compare to the various sparse formats.
self.layout() == kSparseBsc
, self.layout() == kSparseBsr
, self.layout() == kSparseCsc
, self.layout() == kSparseCsr
, self.layout() == kSparse
(see Layout.h).
cc @amjames for visibility. I created a new entry in the roadmap for this so we can track it.
…th for dense Tensors." Identical to #88339 except with a `.has_storage()` check before `.storage()`. Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/) cc ezyang albanD zou3519 gqchen pearu nikitaved soulitzer Lezcano Varal7 [ghstack-poisoned]
…e Tensors. Pull Request resolved: #90217 Identical to #88339 except with a `.has_storage()` check before `.storage()`. ghstack-source-id: 177028549 Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/)
…th for dense Tensors." Identical to #88339 except with a `.has_storage()` check before `.storage()`. Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/) cc ezyang albanD zou3519 gqchen pearu nikitaved soulitzer Lezcano Varal7 [ghstack-poisoned]
…e Tensors. Pull Request resolved: #90217 Identical to #88339 except with a `.has_storage()` check before `.storage()`. ghstack-source-id: 178930904 Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/)
…th for dense Tensors." Identical to #88339 except with a `.has_storage()` check before `.storage()`. Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/) cc ezyang albanD zou3519 gqchen pearu nikitaved soulitzer Lezcano Varal7 [ghstack-poisoned]
…e Tensors. Pull Request resolved: #90217 Identical to #88339 except with a `.has_storage()` check before `.storage()`. ghstack-source-id: 179779511 Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/)
…th for dense Tensors." Identical to #88339 except with a `.has_storage()` check before `.storage()`. Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/) cc ezyang albanD zou3519 gqchen pearu nikitaved soulitzer Lezcano Varal7 [ghstack-poisoned]
…e Tensors. Pull Request resolved: #90217 Identical to #88339 except with a `.has_storage()` check before `.storage()`. ghstack-source-id: 179910561 Differential Revision: [D41737935](https://our.internmc.facebook.com/intern/diff/D41737935/)
@pytorchbot merge -f "unit test failures are preexisting" |
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 |
Stack from ghstack (oldest at bottom):
Identical to #88339 except with a
.has_storage()
check before.storage()
.Differential Revision: D41737935
cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @lezcano @Varal7