Commit 4e59252a authored by Zhong Jianxin's avatar Zhong Jianxin
Browse files

python3Packages.torch: Enable Accelerate.framework on darwin to increase performance

parent 144ede9e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@

  # Build inputs
  numactl,
  CoreServices, libobjc,
  Accelerate, CoreServices, libobjc,

  # Propagated build inputs
  numpy, pyyaml, cffi, click, typing-extensions,
@@ -275,7 +275,7 @@ in buildPythonPackage rec {
    ++ lib.optionals rocmSupport [ openmp ]
    ++ lib.optionals (cudaSupport || rocmSupport) [ magma ]
    ++ lib.optionals stdenv.isLinux [ numactl ]
    ++ lib.optionals stdenv.isDarwin [ CoreServices libobjc ];
    ++ lib.optionals stdenv.isDarwin [ Accelerate CoreServices libobjc ];

  propagatedBuildInputs = [
    cffi
+1 −1
Original line number Diff line number Diff line
@@ -11675,7 +11675,7 @@ self: super: with self; {

  torch = callPackage ../development/python-modules/torch {
    cudaSupport = pkgs.config.cudaSupport or false;
    inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
    inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate CoreServices;
    inherit (pkgs.darwin) libobjc;
    inherit (pkgs.llvmPackages_rocm) openmp;
  };