Skip to content

Add basic support for mps (Apple Silicon) as an accelerator#527

Open
colbyford wants to merge 11 commits intojwohlwend:mainfrom
colbyford:main
Open

Add basic support for mps (Apple Silicon) as an accelerator#527
colbyford wants to merge 11 commits intojwohlwend:mainfrom
colbyford:main

Conversation

@colbyford
Copy link

This PR includes minor changes to the click options for --accelerator to allow mps as an option. This enables GPU support on local devices with Apple Silicon automatically by passing this option through the PyTorch Lightning Trainer() class.

Notes and limitations:

  • In the original code, device_type is hardcoded as "cuda" here. Future updates should pass through the device information automatically to avoid warnings in the torch.autocast(...) method.
  • There are warnings that parts of the process are not supported on MPS. (e.g. pin_memory is unused and aten::linalg_svd will run on CPU), though it folds successfully.
  • The PR also includes a basic Dockerfile template (which is independent from the MPS support changes).

@fnachon
Copy link

fnachon commented Aug 6, 2025

I already made a PR for Apple Silicon, but it was not considered yet: #231

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