diff options
author | Gaetan Lepage <gaetan@glepage.com> | 2024-04-13 02:01:53 +0200 |
---|---|---|
committer | Gaetan Lepage <gaetan@glepage.com> | 2024-05-12 17:23:53 +0200 |
commit | 9c9f01b6706f11a80a30f31d39a53675c03191e3 (patch) | |
tree | 24e3b9d1361809613f7fd92aa380b909e6d8819d | |
parent | cdf5d711535abfee236a398b16865c2ab7c95619 (diff) |
cudaPackagesGoogle: deprecate as only used by tensorflow
-rw-r--r-- | pkgs/development/python-modules/tensorflow/bin.nix | 8 | ||||
-rw-r--r-- | pkgs/development/python-modules/tensorflow/default.nix | 15 | ||||
-rw-r--r-- | pkgs/test/cuda/default.nix | 1 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 5 |
5 files changed, 14 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index 104002361926..65ca45f05666 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -22,7 +22,7 @@ , tensorboard , config , cudaSupport ? config.cudaSupport -, cudaPackagesGoogle +, cudaPackages , zlib , python , keras-applications @@ -43,7 +43,7 @@ assert ! (stdenv.isDarwin && cudaSupport); let packages = import ./binary-hashes.nix; - inherit (cudaPackagesGoogle) cudatoolkit cudnn; + inherit (cudaPackages) cudatoolkit cudnn; in buildPythonPackage { pname = "tensorflow" + lib.optionalString cudaSupport "-gpu"; inherit (packages) version; @@ -199,10 +199,6 @@ in buildPythonPackage { "tensorflow.python.framework" ]; - passthru = { - cudaPackages = cudaPackagesGoogle; - }; - meta = with lib; { description = "Computation using data flow graphs for scalable machine learning"; homepage = "http://tensorflow.org"; diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index ea8dbf13e942..2c44b89aefea 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -19,8 +19,8 @@ # https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0 , config , cudaSupport ? config.cudaSupport -, cudaPackagesGoogle -, cudaCapabilities ? cudaPackagesGoogle.cudaFlags.cudaCapabilities +, cudaPackages +, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities , mklSupport ? false, mkl , tensorboardSupport ? true # XLA without CUDA is broken @@ -50,15 +50,15 @@ let # __ZN4llvm11SmallPtrSetIPKNS_10AllocaInstELj8EED1Ev in any of the # translation units, so the build fails at link time stdenv = - if cudaSupport then cudaPackagesGoogle.backendStdenv + if cudaSupport then cudaPackages.backendStdenv else if originalStdenv.isDarwin then llvmPackages.stdenv else originalStdenv; - inherit (cudaPackagesGoogle) cudatoolkit nccl; + inherit (cudaPackages) cudatoolkit nccl; # use compatible cuDNN (https://www.tensorflow.org/install/source#gpu) # cudaPackages.cudnn led to this: # https://github.com/tensorflow/tensorflow/issues/60398 cudnnAttribute = "cudnn_8_6"; - cudnn = cudaPackagesGoogle.${cudnnAttribute}; + cudnn = cudaPackages.${cudnnAttribute}; gentoo-patches = fetchzip { url = "https://dev.gentoo.org/~perfinion/patches/tensorflow-patches-2.12.0.tar.bz2"; hash = "sha256-SCRX/5/zML7LmKEPJkcM5Tebez9vv/gmE4xhT/jyqWs="; @@ -490,8 +490,8 @@ let broken = stdenv.isDarwin || !(xlaSupport -> cudaSupport) - || !(cudaSupport -> builtins.hasAttr cudnnAttribute cudaPackagesGoogle) - || !(cudaSupport -> cudaPackagesGoogle ? cudatoolkit); + || !(cudaSupport -> builtins.hasAttr cudnnAttribute cudaPackages) + || !(cudaSupport -> cudaPackages ? cudatoolkit); } // lib.optionalAttrs stdenv.isDarwin { timeout = 86400; # 24 hours maxSilent = 14400; # 4h, double the default of 7200s @@ -594,7 +594,6 @@ in buildPythonPackage { # Regression test for #77626 removed because not more `tensorflow.contrib`. passthru = { - cudaPackages = cudaPackagesGoogle; deps = bazel-build.deps; libtensorflow = bazel-build.out; }; diff --git a/pkgs/test/cuda/default.nix b/pkgs/test/cuda/default.nix index dd9ad8b814dc..b463da7c55c5 100644 --- a/pkgs/test/cuda/default.nix +++ b/pkgs/test/cuda/default.nix @@ -3,7 +3,6 @@ recurseIntoAttrs, cudaPackages, - cudaPackagesGoogle, cudaPackages_10_0, cudaPackages_10_1, diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bb15492bf6d8..131d28123f53 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7136,10 +7136,6 @@ with pkgs; cudaPackages_12_3 = callPackage ./cuda-packages.nix { cudaVersion = "12.3"; }; cudaPackages_12 = cudaPackages_12_2; # Latest supported by cudnn - # Use the older cudaPackages for tensorflow and jax, as determined by cudnn - # compatibility: https://www.tensorflow.org/install/source#gpu - cudaPackagesGoogle = cudaPackages_11; - cudaPackages = recurseIntoAttrs cudaPackages_12; # TODO: move to alias diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9eddf6ccd334..d49a033e1eb8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14879,6 +14879,8 @@ self: super: with self; { tensorflow-bin = callPackage ../development/python-modules/tensorflow/bin.nix { inherit (pkgs.config) cudaSupport; + # https://www.tensorflow.org/install/source#gpu + cudaPackages = pkgs.cudaPackages_11; }; tensorflow-build = let @@ -14886,6 +14888,8 @@ self: super: with self; { protobufTF = pkgs.protobuf_21.override { abseil-cpp = pkgs.abseil-cpp_202301; }; + # https://www.tensorflow.org/install/source#gpu + cudaPackagesTF = pkgs.cudaPackages_11; grpcTF = (pkgs.grpc.overrideAttrs ( oldAttrs: rec { # nvcc fails on recent grpc versions, so we use the latest patch level @@ -14931,6 +14935,7 @@ self: super: with self; { inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security; flatbuffers-core = pkgs.flatbuffers; flatbuffers-python = self.flatbuffers; + cudaPackages = compat.cudaPackagesTF; protobuf-core = compat.protobufTF; protobuf-python = compat.protobuf-pythonTF; grpc = compat.grpcTF; |