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

SparseStorage tensor.Long assert #328

Open
Pendulun opened this issue May 24, 2023 · 3 comments
Open

SparseStorage tensor.Long assert #328

Pendulun opened this issue May 24, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Pendulun
Copy link

Hi, thank you for your time on developing this project. I have a question that I think is rather simple: Why do you have to enforce that the SparseStorage's col and other params to be tensor.Long? Is it really necessary? Thanks

@rusty1s
Copy link
Owner

rusty1s commented May 25, 2023

Currently, that is necessary. The reason for that is that a lot of functionality in PyTorch assumes indices to be of type torch.long, e.g., torch.index_select() only works with torch.long indices. I heard that PyTorch team is actively working on more diverse types for these operators in recent versions, so one day this shouldn't be necessary anymore.

@Pendulun
Copy link
Author

Thanks, I'm in a situation where forcing me to use LongTensors is really a waste of memory (IntTensor is enough) that's why the question. Looking forward to the mentioned work of the PyTorch team.

Copy link

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

@github-actions github-actions bot added the stale label Nov 22, 2023
@rusty1s rusty1s added enhancement New feature or request and removed stale labels Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants