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 sum on a sparse COO tensor. #86300

Closed
wants to merge 5 commits into from
Closed

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 5, 2022

🔗 Helpful Links

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

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

❌ 1 Failures, 2 Pending

As of commit 6ae8a14:

The following jobs have failed:

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

@pearu pearu self-assigned this Oct 5, 2022
@pearu pearu added module: sparse Related to torch.sparse release notes: sparse release notes category labels Oct 5, 2022
@pearu pearu added this to In progress in Sparse tensors via automation Oct 5, 2022
@vadimkantorov
Copy link
Contributor

Related: #86232

If sum is supported by direct dispatch (only as sparse_coo_tensor.sum() or also as torch.sum(sparse_coo_tensor)?

If so, then is torch.sparse.sum still needed?

@pearu
Copy link
Collaborator Author

pearu commented Oct 5, 2022

If so, then is torch.sparse.sum still needed?

We are not quite there yet. This PR implements support for the sum over all values but we'll also need to implement the support for dim and keepdim arguments which require more complex algorithms when summing over sparse dimensions.

@pearu pearu requested a review from cpuhrsch October 6, 2022 15:45
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
Summary:
Pull Request resolved: #86300
Approved by: https://github.com/cpuhrsch

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

Reviewed By: seemethere

Differential Revision: D40167132

Pulled By: seemethere

fbshipit-source-id: ea8af116fc65cd1f7280046b824415b055aab61e
@pearu pearu linked an issue Oct 10, 2022 that may be closed by this pull request
@kit1980 kit1980 added the Merged label Mar 24, 2023
@facebook-github-bot facebook-github-bot deleted the gh/pearu/68/head branch June 8, 2023 18:17
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: sparse release notes category
Projects
Development

Successfully merging this pull request may close these issues.

torch.sum() should work on sparse tensors
6 participants