diff --git a/pkgs/development/cuda-modules/cudnn/fixup.nix b/pkgs/development/cuda-modules/cudnn/fixup.nix index 26c8ec63f13e..183f38cfd4cf 100644 --- a/pkgs/development/cuda-modules/cudnn/fixup.nix +++ b/pkgs/development/cuda-modules/cudnn/fixup.nix @@ -38,12 +38,19 @@ finalAttrs: prevAttrs: { ++ lists.optionals finalAttrs.passthru.useCudatoolkitRunfile [ final.cudatoolkit ] ++ lists.optionals (!finalAttrs.passthru.useCudatoolkitRunfile) [ final.libcublas.lib ]; - # Tell autoPatchelf about runtime dependencies. + # Tell autoPatchelf about runtime dependencies. *_infer* libraries only + # exist in CuDNN 8. # NOTE: Versions from CUDNN releases have four components. - postFixup = strings.optionalString (strings.versionAtLeast finalAttrs.version "8.0.5.0") '' - ${meta.getExe' patchelf "patchelf"} $lib/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so - ${meta.getExe' patchelf "patchelf"} $lib/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so - ''; + postFixup = + strings.optionalString + ( + strings.versionAtLeast finalAttrs.version "8.0.5.0" + && strings.versionOlder finalAttrs.version "9.0.0.0" + ) + '' + ${meta.getExe patchelf} $lib/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so + ${meta.getExe patchelf} $lib/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so + ''; passthru.useCudatoolkitRunfile = strings.versionOlder cudaVersion "11.3.999"; diff --git a/pkgs/development/cuda-modules/cudnn/releases.nix b/pkgs/development/cuda-modules/cudnn/releases.nix index a0e9d8083b7a..26acaf4a3640 100644 --- a/pkgs/development/cuda-modules/cudnn/releases.nix +++ b/pkgs/development/cuda-modules/cudnn/releases.nix @@ -257,6 +257,21 @@ url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz"; hash = "sha256-R1MzYlx+QqevPKCy91BqEG4wyTsaoAgc2cE++24h47s="; } + { + version = "9.3.0.75"; + minCudaVersion = "12.0"; + maxCudaVersion = "12.6"; + url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-9.3.0.75_cuda12-archive.tar.xz"; + hash = "sha256-PW7xCqBtyTOaR34rBX4IX/hQC73ueeQsfhNlXJ7/LCY="; + } + { + version = "9.3.0.75"; + minCudaVersion = "11.8"; + maxCudaVersion = "11.8"; + url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-9.3.0.75_cuda11-archive.tar.xz"; + hash = "sha256-Bp2ghM02jzn7gw1MTpMYAwZPtl52b0z33y2ko0aiup8"; + } + ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7a0f13357230..553c1020ca20 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2696,8 +2696,14 @@ self: super: with self; { cufflinks = callPackage ../development/python-modules/cufflinks { }; - # cupy 12.2.0 possibly incompatible with cutensor 2.0 that comes with cudaPackages_12 - cupy = callPackage ../development/python-modules/cupy { cudaPackages = pkgs.cudaPackages_11; }; + cupy = callPackage ../development/python-modules/cupy { + # cupy 12.2.0 possibly incompatible with cutensor 2.0 that comes with cudaPackages_12 + cudaPackages = pkgs.cudaPackages_11.overrideScope (cu-fi: _: { + # CuDNN 9 is not supported: + # https://github.com/cupy/cupy/issues/8215 + cudnn = cu-fi.cudnn_8_9; + }); + }; curio = callPackage ../development/python-modules/curio { };