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

Running with MPS as device (for apple M1 chips) #136

Open
JoseEliel opened this issue Jun 2, 2022 · 1 comment
Open

Running with MPS as device (for apple M1 chips) #136

JoseEliel opened this issue Jun 2, 2022 · 1 comment

Comments

@JoseEliel
Copy link

JoseEliel commented Jun 2, 2022

Hi!

I've been trying to set this up on a MacBook with an M1 chip. However, simply changing ".cuda()" -> .to(device) with device being set to "mps" does not work.

As far as I can understand, the issue boils down to the use of torch.cuda.amp (the gradient scaler and autocaster) in trainer.py. I tried setting enabled=false by hand, but that does not work either. My current knowledge is not enough to figure out how to modify the code to get around that. It does work if I set the device to "CPU" though.

Any pointers on how to do it?

Thanks for the hard work in this implementation, looking forward to making it work on my M1 MacBook.

@YannickAaron
Copy link

Since this was somehow connected to 8105 maybe it will work now.

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

2 participants