feat: add macOS CPU/MPS support alongside CUDA#516
Open
marketswitch wants to merge 1 commit into
Open
Conversation
pyproject.toml used a hardcoded CUDA 12.8 torch index which has no macOS wheels, making the project uninstallable on macOS. This patch adds a platform-conditional torch source so: - Linux/Windows → pytorch-cu128 (unchanged CUDA behaviour) - macOS → pytorch-cpu (uses MPS on Apple Silicon) Also relaxes the torch pin from ==2.9.1 to >=2.11.0 so the CPU index can resolve a compatible wheel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Is this tested properly ? very interesting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
pyproject.tomlhardcodedtorchto thepytorch-cu128index, which only ships Linux and Windows wheels. This makes the project completely uninstallable on macOS.This PR adds a platform-conditional torch source:
pytorch-cu128(existing CUDA 12.8 behaviour, unchanged)pytorch-cpu(resolves a CPU+MPS wheel, uses Apple Silicon GPU via MPS)The torch pin is also relaxed from
==2.9.1to>=2.11.0so the CPU index can resolve a compatible wheel.Why
Developers on Macs couldn't even run
uv syncto get started. With MPS available on Apple Silicon, local experimentation is viable — training is slow vs. H100 but works for iterating on ideas before running overnight jobs on a GPU server.Testing