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

make torch.save(PrivateUse1's Tensor) more generalizable #126384

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

huihoaan
Copy link
Contributor

@huihoaan huihoaan commented May 16, 2024

Fixes #121797
As described in the issue, currently, torch is unable to save SpraseCOOTensor in PrivateUse1 (including csr/csc/bsr/bsc). The reason is that SparseTensor does not have storage, and numpy cannot handle sparse, so it cannot be saved.
I think PrivateUse1 should be more CUDA oriented than a few special devices like XLA, MTIA, MAIA.
Please let me know if the deleted code is necessary in some special scenarios.

cc @NmomoN @mengpenghui @fwenguang @cdzhan @1274085042 @PHLens

Copy link

pytorch-bot bot commented May 16, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 0bf7038 with merge base d61a81a (image):
💚 Looks good so far! There are no failures yet. 💚

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

@drisspg drisspg added module: PrivateUse1 private use triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: PrivateUse1 private use open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can’t save SparseTensor for custom device
3 participants