-
-
Notifications
You must be signed in to change notification settings - Fork 252
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 on Apple silicon #233
base: master
Are you sure you want to change the base?
Conversation
would it be posible to also add support in the form of a docker container? |
@fireblade2534 I'm not sure, maybe, but that will require a separate PR. Docker on Mac doesn't support GPU, but Podman does, through Vulkan GPU APIs. The only Pytorch reference for Vulkan I can find is https://pytorch.org/executorch/stable/native-delegates-executorch-vulkan-delegate.html Or maybe Vulkan on onnx: microsoft/onnxruntime#21917 |
ah ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a mac so I can't test this but it looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, will run a few checks when I'm at my Mac too, and see if I can bring a docker container around
export PYTORCH_ENABLE_MPS_FALLBACK=1 | ||
|
||
# Run FastAPI with GPU extras using uv run | ||
uv pip install -e . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script looks good
Tested on Macbook Pro M1 Max.
start-mps_mac.sh
)Notes
aten::angle
operation falls back to CPU, all other operations utilize MPSDEVICE_TYPE=mps
PYTORCH_ENABLE_MPS_FALLBACK=1