-
Notifications
You must be signed in to change notification settings - Fork 887
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
Please replace .cuda() with to(device) in Stanza #1032
Comments
This is a good idea. I will see what we can do
…On Thu, May 19, 2022 at 8:34 AM Sebastian Gombert ***@***.***> wrote:
I wanted to test Stanza on the recently released MPS backend for the M1
macs. However, I noticed looking in the code that Stanza consistently uses
the .cuda() method instead of the more flexible .to(device), and .cuda()
does not seem to be overwritten by the MPS backend. While I get that it is
convenient for most users to just set use_gpu=True, I miss the option to
alternatively set a specific device which would make the framework much
more flexible.
—
Reply to this email directly, view it on GitHub
<#1032>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWP6JZHTSZLOCJXI2IDVKZNPRANCNFSM5WMUI3YA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I did in fact replace You can now theoretically set pytorch/pytorch#80306 So technically I've done exactly what you wanted, while at the same time I've accomplished absolutely nothing |
This is now part of Stanza 1.5. As mentioned above, the current torch version is buggy for MPS. The next version is supposed to have a fix for that, though |
Once this is fixed in PyTorch, I assume |
i tried a couple weeks ago, and it didn't work with the nightly build of pytorch. |
I wanted to test Stanza on the recently released MPS backend for the M1 macs. However, I noticed looking in the code that Stanza consistently uses the .cuda() method instead of the more flexible .to(device), and .cuda() does not seem to be overwritten by the MPS backend. While I get that it is convenient for most users to just set use_gpu=True, I miss the option to alternatively set a specific device which would make the framework much more flexible.
The text was updated successfully, but these errors were encountered: