about summary refs log tree commit diff
path: root/pkgs/top-level/release-cuda.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2022-04-03 11:19:04 +0200
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2022-04-09 08:50:22 +0200
commit1d63f89caaf140ac33f1796dc0aaeb20f4ac4e55 (patch)
tree82668e186706e393a7f43c029be21ea4abfc44e9 /pkgs/top-level/release-cuda.nix
parent934190fa06dc0de1fe7eecc543583d91657fb5fa (diff)
cudaPackages: overhaul of how we package cuda packages
There are many different versions of the `cudatoolkit` and related
cuda packages, and it can be tricky to ensure they remain compatible.

- `cudaPackages` is now a package set with `cudatoolkit`, `cudnn`, `cutensor`, `nccl`, as well as `cudatoolkit` split into smaller packages ("redist");
- expressions should now use `cudaPackages` as parameter instead of the individual cuda packages;
- `makeScope` is now used, so it is possible to use `.overrideScope'` to set e.g. a different `cudnn` version;
- `release-cuda.nix` is introduced to easily evaluate cuda packages using hydra.
Diffstat (limited to 'pkgs/top-level/release-cuda.nix')
-rw-r--r--pkgs/top-level/release-cuda.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/top-level/release-cuda.nix b/pkgs/top-level/release-cuda.nix
new file mode 100644
index 0000000000000..6cc149936ac8e
--- /dev/null
+++ b/pkgs/top-level/release-cuda.nix
@@ -0,0 +1,55 @@
+/*
+    Test CUDA packages.
+
+    This release file will not be tested on hydra.nixos.org
+    because it requires unfree software.
+
+    Test for example like this:
+
+        $ hydra-eval-jobs pkgs/top-level/release-cuda.nix --option restrict-eval false -I foo=. --arg nixpkgs '{ outPath = ./.; revCount = 0; shortRev = "aabbcc"; }'
+
+*/
+
+{ # The platforms for which we build Nixpkgs.
+  supportedSystems ? [
+    "x86_64-linux"
+  ]
+, # Attributes passed to nixpkgs.
+  nixpkgsArgs ? { config = { allowUnfree = true; inHydra = true; }; }
+}:
+
+with import ./release-lib.nix {inherit supportedSystems nixpkgsArgs; };
+with lib;
+
+let
+  # Package sets to evaluate
+  packageSets = [
+    "cudaPackages_10_0"
+    "cudaPackages_10_1"
+    "cudaPackages_10_2"
+    "cudaPackages_10"
+    "cudaPackages_11_0"
+    "cudaPackages_11_1"
+    "cudaPackages_11_2"
+    "cudaPackages_11_3"
+    "cudaPackages_11_4"
+    "cudaPackages_11_5"
+    "cudaPackages_11_6"
+    "cudaPackages_11"
+    "cudaPackages"
+  ];
+
+  evalPackageSet = pset: mapTestOn { ${pset} = packagePlatforms pkgs.${pset}; };
+
+  jobs = (mapTestOn ({
+    # Packages to evaluate
+    python3.pkgs.caffeWithCuda = linux;
+    python3.pkgs.jaxlibWithCuda = linux;
+    python3.pkgs.libgpuarray = linux;
+    python3.pkgs.tensorflowWithCuda = linux;
+    python3.pkgs.pyrealsense2WithCuda = linux;
+    python3.pkgs.pytorchWithCuda = linux;
+    python3.pkgs.jaxlib = linux;
+  }) // (genAttrs packageSets evalPackageSet));
+
+in jobs