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

[Feature request] Allowing StorageView.to() method to support moving between devices #1575

Closed
AtomAnu opened this issue Dec 5, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@AtomAnu
Copy link

AtomAnu commented Dec 5, 2023

It seems that this feature has already been implemented at the C++ level (here). So, I am wondering if this can be implemented on the Python interface level to allow changing devices (GPU to CPU or vice versa) easily.

Thank you!

@minhthuc2502
Copy link
Collaborator

Normally, If you have StorageView object in the python, you can use to function to move data from CPU to GPU or vice versa. Read cpp/storage_view.cc for more.

@AtomAnu
Copy link
Author

AtomAnu commented Dec 5, 2023

@minhthuc2502 Thank you for your answer! However, looking at this line in cpp/storage_view.cc, it seems that the function to only supports dtype as the input argument.

@minhthuc2502 minhthuc2502 added the enhancement New feature or request label Dec 5, 2023
@ozancaglayan
Copy link
Contributor

Hi

Are there any near-term plans to implement this?

@ozancaglayan
Copy link
Contributor

FYI, I started working on bringing move_to to python.

@ozancaglayan
Copy link
Contributor

@AtomAnu you can close this issue as the PR is now merged

@AtomAnu AtomAnu closed this as completed Feb 8, 2024
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

3 participants