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

utils.get_device() should include 'mps' #136

Open
Zihann73 opened this issue Jun 10, 2024 · 1 comment
Open

utils.get_device() should include 'mps' #136

Zihann73 opened this issue Jun 10, 2024 · 1 comment

Comments

@Zihann73
Copy link

https://pytorch.org/docs/master/tensor_attributes.html#torch-device
Now this function only return cpu or cuda. I failed to run some transformer based models on my MacOS due to this limitation.
image
I fixed it by calling model.to('mps').
image

@Zihann73
Copy link
Author

Please check my quick fix: #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant