Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

robieta
Copy link

@robieta robieta commented Dec 5, 2022

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

…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]
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 5, 2022

🔗 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 SEVs

There are 2 currently active SEVs. If your PR is affected, please view them below:

❌ 6 Failures

As of commit 7ffc90b:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

robieta pushed a commit that referenced this pull request Dec 5, 2022
…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
@robieta robieta requested review from ngimel and removed request for soulitzer December 5, 2022 21:11
@robieta robieta added module: autograd Related to torch.autograd, and the autograd engine in general topic: performance topic category release notes: autograd release notes category labels Dec 5, 2022
Copy link
Collaborator

@ngimel ngimel left a 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()) {
Copy link
Collaborator

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?

Copy link
Contributor

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]
robieta pushed a commit that referenced this pull request Jan 3, 2023
…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]
robieta pushed a commit that referenced this pull request Jan 31, 2023
…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]
robieta pushed a commit that referenced this pull request Feb 9, 2023
…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/)
@robieta robieta added ciflow/trunk Trigger trunk jobs on your pull request ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR labels Feb 9, 2023
…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]
robieta pushed a commit that referenced this pull request Feb 10, 2023
…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/)
@robieta
Copy link
Author

robieta commented Feb 10, 2023

@pytorchbot merge -f "unit test failures are preexisting"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@facebook-github-bot facebook-github-bot deleted the gh/robieta/159/head branch June 8, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/trunk Trigger trunk jobs on your pull request Merged module: autograd Related to torch.autograd, and the autograd engine in general release notes: autograd release notes category topic: performance topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants