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.
This commit is contained in:
Frederik Rietdijk
2022-04-03 11:19:04 +02:00
committed by Frederik Rietdijk
parent 934190fa06
commit 1d63f89caa
50 changed files with 3350 additions and 521 deletions
@@ -9,7 +9,7 @@
, six
, nose
, Mako
, cudaSupport ? false, cudatoolkit
, cudaSupport ? false, cudaPackages
, openclSupport ? true, ocl-icd, clblas
}:
@@ -30,7 +30,7 @@ buildPythonPackage rec {
configurePhase = "cmakeConfigurePhase";
libraryPath = lib.makeLibraryPath (
lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out ]
lib.optionals cudaSupport (with cudaPackages; [ cudatoolkit.lib cudatoolkit.out ])
++ lib.optionals openclSupport ([ clblas ] ++ lib.optional (!stdenv.isDarwin) ocl-icd)
);