Skip to content

Commit

Permalink
python3Packages.torch: switch to apple-sdk_13
Browse files Browse the repository at this point in the history
Switch to apple-sdk_13 on Darwin. This enables the use of MPS (Metal
Performance Shaders) on macOS.

Signed-off-by: Mika Tammi <[email protected]>
  • Loading branch information
mikatammi committed Oct 27, 2024
1 parent cae0fd4 commit 58971c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkgs/development/python-modules/torch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
removeReferencesTo,

# Build inputs
darwin,
apple-sdk_13,
numactl,

# dependencies
Expand Down Expand Up @@ -519,9 +519,7 @@ buildPythonPackage rec {
++ lib.optionals (cudaSupport || rocmSupport) [ effectiveMagma ]
++ lib.optionals stdenv.hostPlatform.isLinux [ numactl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Accelerate
darwin.apple_sdk.frameworks.CoreServices
darwin.libobjc
apple-sdk_13
]
++ lib.optionals tritonSupport [ _tritonEffective ]
++ lib.optionals MPISupport [ mpi ]
Expand Down

0 comments on commit 58971c7

Please sign in to comment.