about summary refs log tree commit diff
path: root/pkgs/development/libraries/science
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/science')
-rw-r--r--pkgs/development/libraries/science/math/cudnn/extension.nix58
-rw-r--r--pkgs/development/libraries/science/math/tensorrt/extension.nix4
2 files changed, 50 insertions, 12 deletions
diff --git a/pkgs/development/libraries/science/math/cudnn/extension.nix b/pkgs/development/libraries/science/math/cudnn/extension.nix
index bd7935783b738..3804361e0ea73 100644
--- a/pkgs/development/libraries/science/math/cudnn/extension.nix
+++ b/pkgs/development/libraries/science/math/cudnn/extension.nix
@@ -2,6 +2,7 @@ final: prev: let
 
   inherit (final) callPackage;
   inherit (prev) cudatoolkit cudaVersion lib pkgs;
+  inherit (prev.lib.versions) major;
 
   ### CuDNN
 
@@ -27,7 +28,9 @@ final: prev: let
     # Add all supported builds as attributes
     allBuilds = mapAttrs' (version: file: nameValuePair (computeName version) (buildCuDnnPackage (removeAttrs file ["fileVersion"]))) supportedVersions;
     # Set the default attributes, e.g. cudnn = cudnn_8_3_1;
-    defaultBuild = { "cudnn" = allBuilds.${computeName cuDnnDefaultVersion}; };
+    defaultBuild = { "cudnn" = if allBuilds ? ${computeName cuDnnDefaultVersion}
+      then allBuilds.${computeName cuDnnDefaultVersion}
+      else throw "cudnn-${cuDnnDefaultVersion} does not support your cuda version ${cudaVersion}"; };
   in allBuilds // defaultBuild;
 
   cuDnnVersions = let
@@ -113,21 +116,54 @@ final: prev: let
         supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" ];
       }
     ];
+    "8.5.0" = [
+      rec {
+        fileVersion = "10.2";
+        fullVersion = "8.5.0.96";
+        hash = "sha256-1mzhbbzR40WKkHnQLtJHhg0vYgf7G8a0OBcCwIOkJjM=";
+        url = "${urlPrefix}/v${majorMinorPatch fullVersion}/local_installers/${fileVersion}/cudnn-linux-x86_64-${fullVersion}_cuda${major fileVersion}-archive.tar.xz";
+        supportedCudaVersions = [ "10.2" ];
+      }
+      rec {
+        fileVersion = "11.7";
+        fullVersion = "8.5.0.96";
+        hash = "sha256-VFSm/ZTwCHKMqumtrZk8ToXvNjAuJrzkO+p9RYpee20=";
+        url = "${urlPrefix}/v${majorMinorPatch fullVersion}/local_installers/${fileVersion}/cudnn-linux-x86_64-${fullVersion}_cuda${major fileVersion}-archive.tar.xz";
+        supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" ];
+      }
+    ];
+    "8.6.0" = [
+      rec {
+        fileVersion = "10.2";
+        fullVersion = "8.6.0.163";
+        hash = "sha256-t4sr/GrFqqdxu2VhaJQk5K1Xm/0lU4chXG8hVL09R9k=";
+        url = "${urlPrefix}/v${majorMinorPatch fullVersion}/local_installers/${fileVersion}/cudnn-linux-x86_64-${fullVersion}_cuda${major fileVersion}-archive.tar.xz";
+        supportedCudaVersions = [ "10.2" ];
+      }
+      rec {
+        fileVersion = "11.7";
+        fullVersion = "8.6.0.163";
+        hash = "sha256-u8OW30cpTGV+3AnGAGdNYIyxv8gLgtz0VHBgwhcRFZ4=";
+        url = "${urlPrefix}/v${majorMinorPatch fullVersion}/local_installers/${fileVersion}/cudnn-linux-x86_64-${fullVersion}_cuda${major fileVersion}-archive.tar.xz";
+        supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" "11.8" ];
+      }
+    ];
   };
 
   # Default attributes
   cuDnnDefaultVersion = {
     "10.0" = "7.4.2";
     "10.1" = "7.6.5";
-    "10.2" = "8.3.2";
-    "11.0" = "8.3.2";
-    "11.1" = "8.3.2";
-    "11.2" = "8.3.2";
-    "11.3" = "8.3.2";
-    "11.4" = "8.3.2";
-    "11.5" = "8.3.2";
-    "11.6" = "8.3.2";
-    "11.7" = "8.4.0";
-  }.${cudaVersion} or "8.3.2";
+    "10.2" = "8.6.0";
+    "11.0" = "8.6.0";
+    "11.1" = "8.6.0";
+    "11.2" = "8.6.0";
+    "11.3" = "8.6.0";
+    "11.4" = "8.6.0";
+    "11.5" = "8.6.0";
+    "11.6" = "8.6.0";
+    "11.7" = "8.6.0";
+    "11.8" = "8.6.0";
+  }.${cudaVersion} or "8.6.0";
 
 in cuDnnPackages
diff --git a/pkgs/development/libraries/science/math/tensorrt/extension.nix b/pkgs/development/libraries/science/math/tensorrt/extension.nix
index 2c4503272785b..b4f47a8969c14 100644
--- a/pkgs/development/libraries/science/math/tensorrt/extension.nix
+++ b/pkgs/development/libraries/science/math/tensorrt/extension.nix
@@ -24,7 +24,9 @@ final: prev: let
     # Add all supported builds as attributes
     allBuilds = mapAttrs' (version: file: nameValuePair (computeName version) (buildTensorRTPackage (removeAttrs file ["fileVersionCuda"]))) supportedVersions;
     # Set the default attributes, e.g. tensorrt = tensorrt_8_4;
-    defaultBuild = { "tensorrt" = allBuilds.${computeName tensorRTDefaultVersion}; };
+    defaultBuild = { "tensorrt" = if allBuilds ? ${computeName tensorRTDefaultVersion}
+      then allBuilds.${computeName tensorRTDefaultVersion}
+      else throw "tensorrt-${tensorRTDefaultVersion} does not support your cuda version ${cudaVersion}"; };
   in allBuilds // defaultBuild;
 
   tensorRTVersions = {