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

This commit is contained in:
Zhong Jianxin
2023-03-09 19:57:13 +08:00
parent 144ede9ee6
commit 4e59252a2a
2 changed files with 3 additions and 3 deletions
@@ -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
View File
@@ -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;
};