lol

cudaPackagesGoogle: init, a package-set for jax and tf

+21 -18
+4 -4
pkgs/development/python-modules/jaxlib/bin.nix
··· 29 29 , stdenv 30 30 # Options: 31 31 , cudaSupport ? config.cudaSupport 32 - , cudaPackages ? {} 32 + , cudaPackagesGoogle 33 33 }: 34 34 35 35 let 36 - inherit (cudaPackages) cudatoolkit cudnn; 36 + inherit (cudaPackagesGoogle) cudatoolkit cudnn; 37 37 38 38 version = "0.4.20"; 39 39 ··· 210 210 maintainers = with maintainers; [ samuela ]; 211 211 platforms = [ "aarch64-darwin" "x86_64-linux" "x86_64-darwin" ]; 212 212 broken = 213 - !(cudaSupport -> (cudaPackages ? cudatoolkit) && lib.versionAtLeast cudatoolkit.version "11.1") 214 - || !(cudaSupport -> (cudaPackages ? cudnn) && lib.versionAtLeast cudnn.version "8.2") 213 + !(cudaSupport -> (cudaPackagesGoogle ? cudatoolkit) && lib.versionAtLeast cudatoolkit.version "11.1") 214 + || !(cudaSupport -> (cudaPackagesGoogle ? cudnn) && lib.versionAtLeast cudnn.version "8.2") 215 215 || !(cudaSupport -> stdenv.isLinux); 216 216 }; 217 217 }
+2 -2
pkgs/development/python-modules/jaxlib/default.nix
··· 44 44 , config 45 45 # CUDA flags: 46 46 , cudaSupport ? config.cudaSupport 47 - , cudaPackages ? {} 47 + , cudaPackagesGoogle 48 48 49 49 # MKL: 50 50 , mklSupport ? true 51 51 }: 52 52 53 53 let 54 - inherit (cudaPackages) backendStdenv cudatoolkit cudaFlags cudnn nccl; 54 + inherit (cudaPackagesGoogle) backendStdenv cudatoolkit cudaFlags cudnn nccl; 55 55 56 56 pname = "jaxlib"; 57 57 version = "0.4.20";
+3 -3
pkgs/development/python-modules/tensorflow/bin.nix
··· 22 22 , tensorboard 23 23 , config 24 24 , cudaSupport ? config.cudaSupport 25 - , cudaPackages ? {} 25 + , cudaPackagesGoogle 26 26 , zlib 27 27 , python 28 28 , keras-applications ··· 43 43 44 44 let 45 45 packages = import ./binary-hashes.nix; 46 - inherit (cudaPackages) cudatoolkit cudnn; 46 + inherit (cudaPackagesGoogle) cudatoolkit cudnn; 47 47 in buildPythonPackage { 48 48 pname = "tensorflow" + lib.optionalString cudaSupport "-gpu"; 49 49 inherit (packages) version; ··· 200 200 ]; 201 201 202 202 passthru = { 203 - inherit cudaPackages; 203 + cudaPackages = cudaPackagesGoogle; 204 204 }; 205 205 206 206 meta = with lib; {
+8 -8
pkgs/development/python-modules/tensorflow/default.nix
··· 19 19 # https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0 20 20 , config 21 21 , cudaSupport ? config.cudaSupport 22 - , cudaPackages ? { } 23 - , cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities 22 + , cudaPackagesGoogle 23 + , cudaCapabilities ? cudaPackagesGoogle.cudaFlags.cudaCapabilities 24 24 , mklSupport ? false, mkl 25 25 , tensorboardSupport ? true 26 26 # XLA without CUDA is broken ··· 50 50 # __ZN4llvm11SmallPtrSetIPKNS_10AllocaInstELj8EED1Ev in any of the 51 51 # translation units, so the build fails at link time 52 52 stdenv = 53 - if cudaSupport then cudaPackages.backendStdenv 53 + if cudaSupport then cudaPackagesGoogle.backendStdenv 54 54 else if originalStdenv.isDarwin then llvmPackages_11.stdenv 55 55 else originalStdenv; 56 - inherit (cudaPackages) cudatoolkit nccl; 56 + inherit (cudaPackagesGoogle) cudatoolkit nccl; 57 57 # use compatible cuDNN (https://www.tensorflow.org/install/source#gpu) 58 58 # cudaPackages.cudnn led to this: 59 59 # https://github.com/tensorflow/tensorflow/issues/60398 60 60 cudnnAttribute = "cudnn_8_6"; 61 - cudnn = cudaPackages.${cudnnAttribute}; 61 + cudnn = cudaPackagesGoogle.${cudnnAttribute}; 62 62 gentoo-patches = fetchzip { 63 63 url = "https://dev.gentoo.org/~perfinion/patches/tensorflow-patches-2.12.0.tar.bz2"; 64 64 hash = "sha256-SCRX/5/zML7LmKEPJkcM5Tebez9vv/gmE4xhT/jyqWs="; ··· 486 486 broken = 487 487 stdenv.isDarwin 488 488 || !(xlaSupport -> cudaSupport) 489 - || !(cudaSupport -> builtins.hasAttr cudnnAttribute cudaPackages) 490 - || !(cudaSupport -> cudaPackages ? cudatoolkit); 489 + || !(cudaSupport -> builtins.hasAttr cudnnAttribute cudaPackagesGoogle) 490 + || !(cudaSupport -> cudaPackagesGoogle ? cudatoolkit); 491 491 } // lib.optionalAttrs stdenv.isDarwin { 492 492 timeout = 86400; # 24 hours 493 493 maxSilent = 14400; # 4h, double the default of 7200s ··· 590 590 # Regression test for #77626 removed because not more `tensorflow.contrib`. 591 591 592 592 passthru = { 593 - inherit cudaPackages; 593 + cudaPackages = cudaPackagesGoogle; 594 594 deps = bazel-build.deps; 595 595 libtensorflow = bazel-build.out; 596 596 };
+4
pkgs/top-level/all-packages.nix
··· 7318 7318 cudaPackages_12_2 = callPackage ./cuda-packages.nix { cudaVersion = "12.2"; }; 7319 7319 cudaPackages_12 = cudaPackages_12_0; 7320 7320 7321 + # Use the older cudaPackages for tensorflow and jax, as determined by cudnn 7322 + # compatibility: https://www.tensorflow.org/install/source#gpu 7323 + cudaPackagesGoogle = cudaPackages_11; 7324 + 7321 7325 # TODO: try upgrading once there is a cuDNN release supporting CUDA 12. No 7322 7326 # such cuDNN release as of 2023-01-10. 7323 7327 cudaPackages = recurseIntoAttrs cudaPackages_11;
-1
pkgs/top-level/python-packages.nix
··· 13924 13924 callPackage ../development/python-modules/tensorflow { 13925 13925 inherit (pkgs.darwin) cctools; 13926 13926 inherit (pkgs.config) cudaSupport; 13927 - inherit (self.tensorflow-bin) cudaPackages; 13928 13927 inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security; 13929 13928 flatbuffers-core = pkgs.flatbuffers; 13930 13929 flatbuffers-python = self.flatbuffers;