From ff4478e450b486f4f89655ea0bb1d9b1ff4b5418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Sat, 3 Aug 2024 10:14:12 +0200 Subject: [PATCH] cudaPackages.cudnn_9_3: init at 9.3.0.75 --- pkgs/development/cuda-modules/cudnn/fixup.nix | 17 ++++++++++++----- .../development/cuda-modules/cudnn/releases.nix | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/pkgs/development/cuda-modules/cudnn/fixup.nix b/pkgs/development/cuda-modules/cudnn/fixup.nix index 26c8ec63f13e..054bb17e6830 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 "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 + ''; 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"; + } + ]; }; }