-
Notifications
You must be signed in to change notification settings - Fork 165
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
HFShim: support MPS device #328
Conversation
Before this change, two devices and map locations were supported: - CUDA: `cuda:N` - CPU: `cpu` This change adds support for Metal Performance Shader (MPS) devices. In the case of MPS, the map location for loading a model is `cpu`, so we use: - CUDA: device: `cuda:N`, map location: `cuda:N` - MPS: device: `mps`, map location: `cpu` - CPU: device: `cpu`, map location: `cpu`
I think we also need a dev version of spaCy to get the right Thinc version for this PR. |
Can this be done soon after the v3.4.0 release instead? It's not going to break anything in |
That would work. It shouldn't break anything, just moving models to the right device in a more generic manner. |
This version is required to get Torch device support from Thinc 8.1.0.
Set the minimum spaCy version to 3.4.0 and merged in master. This is now ready for review. |
@explosion-bot please test_gpu |
URL: https://buildkite.com/explosion-ai/spacy-transformers-gpu-test-suite/builds/19 |
Before this change, two devices and map locations were supported:
cuda:N
cpu
This change adds support for other devices like Metal Performance Shader (MPS) devices by mapping to the active Torch device.