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

Support autograd on Linear with sparse compressed weight. #86137

Closed
wants to merge 8 commits into from

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 3, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86137

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 Failures

As of commit 05c68b2:

The following jobs have failed:

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

@pytorch-bot pytorch-bot bot added the release notes: nn release notes category label Oct 3, 2022
pearu added a commit that referenced this pull request Oct 3, 2022
ghstack-source-id: 9fe702d7887277945905967921b68f6e278af837
Pull Request resolved: #86137
@albanD
Copy link
Collaborator

albanD commented Oct 3, 2022

@soulitzer you can handle that one?

@facebook-github-bot
Copy link
Contributor

/easycla

As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details.

This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 4, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

Comment on lines +461 to +466
switch(input_.layout()) {
case kSparseCsr: return grad.sparse_mask(input_.to_sparse()).to_sparse_csr();
case kSparseCsc: return grad.sparse_mask(input_.to_sparse()).to_sparse_csc();
// BSR and BSC should be handled via implement sparse_compressed_mask
default: ; // fall back to unsupported input layout error
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After resolving #80542, this could be replaced by

    return grad.sparse_mask(input_.to_sparse()).to(input_.layout());

pearu added a commit that referenced this pull request Oct 4, 2022
ghstack-source-id: 2eb0d3d2146ddd890ee4baa836868db6afdbc73a
Pull Request resolved: #86137
pearu added a commit that referenced this pull request Oct 4, 2022
ghstack-source-id: 50aa539aad890c295bdf31d83233a4d57d4466d0
Pull Request resolved: #86137
@pearu pearu added this to In progress in Sparse tensors via automation Oct 4, 2022
@pearu pearu self-assigned this Oct 4, 2022
@pearu pearu added the module: sparse Related to torch.sparse label Oct 4, 2022
@pearu pearu requested a review from cpuhrsch October 6, 2022 15:44
Sparse tensors automation moved this from In progress to Reviewer approved Oct 6, 2022
@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 6, 2022
Sparse tensors automation moved this from Reviewer approved to Done Oct 6, 2022
facebook-github-bot pushed a commit that referenced this pull request Oct 7, 2022
…86137)

Summary:
Pull Request resolved: #86137
Approved by: https://github.com/cpuhrsch

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/f104490d635747e4164e954d36954ea3a01731a5

Reviewed By: seemethere

Differential Revision: D40167118

Pulled By: seemethere

fbshipit-source-id: 2b61f89c7ba514e29acbf91fce5c02097198cf21
@kit1980 kit1980 added the Merged label Mar 24, 2023
@facebook-github-bot facebook-github-bot deleted the gh/pearu/65/head branch June 8, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request cla signed Merged module: sparse Related to torch.sparse open source release notes: nn release notes category
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants