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

Added support for MPS (Apple metal) GPU #839

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

michaelbarkasi
Copy link

Previously, specifying "device = torch.device('mps')" would raise errors, as code handled any call to a device besides the cpu as a call to cuda. Pytorch also supports mps (metal's GPU API), although there are some limitations and the function calls are different. I coded everything so that where mps and cuda support differ, there are conditionals to catch which device is being used. This way I haven't changed any cuda-related code.

@jacobpennington
Copy link
Collaborator

Thanks for submitting this. We're not going to merge the changes at this time. The changes are more involved than expected, and we don't have a way to test this ourselves. However, we'll leave this pull request up so that anyone else wanting to use MPS can see what they would need to tweak to get it working.

If we get interest and feedback from more users, we may try to incorporate this in the future.

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

Successfully merging this pull request may close these issues.

2 participants