-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport release-24.05] release-cuda: build with config.cudaSupport
- Loading branch information
1 parent
2527da1
commit 0ef8e1b
Showing
1 changed file
with
151 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,166 @@ | ||
/* | ||
Test CUDA packages. | ||
This release file will not be tested on hydra.nixos.org | ||
because it requires unfree software. | ||
This release file is currently not tested on hydra.nixos.org | ||
because it requires unfree software, but it is tested by | ||
https://hydra.nix-community.org/jobset/nixpkgs/cuda-nixos-unstable. | ||
Test for example like this: | ||
Cf. https://github.com/nix-community/infra/pull/1335 | ||
$ hydra-eval-jobs pkgs/top-level/release-cuda.nix --option restrict-eval false -I foo=. --arg nixpkgs '{ outPath = ./.; revCount = 0; shortRev = "aabbcc"; }' | ||
Test for example like this: | ||
$ hydra-eval-jobs pkgs/top-level/release-cuda.nix -I . | ||
*/ | ||
|
||
{ # The platforms for which we build Nixpkgs. | ||
let | ||
lib = import ../../lib; | ||
ensureList = x: if builtins.isList x then x else [ x ]; | ||
allowUnfreePredicate = | ||
p: | ||
builtins.all ( | ||
license: | ||
license.free | ||
|| builtins.elem license.shortName [ | ||
"CUDA EULA" | ||
"cuDNN EULA" | ||
"cuTENSOR EULA" | ||
"NVidia OptiX EULA" | ||
] | ||
) (ensureList p.meta.license); | ||
in | ||
|
||
{ | ||
# The platforms for which we build Nixpkgs. | ||
supportedSystems ? [ | ||
"x86_64-linux" | ||
] | ||
, # Attributes passed to nixpkgs. | ||
nixpkgsArgs ? { config = { allowUnfree = true; inHydra = true; }; } | ||
}: | ||
"aarch64-linux" | ||
], | ||
variant ? "cuda", | ||
# Attributes passed to nixpkgs. | ||
nixpkgsArgs ? { | ||
config = { | ||
inherit allowUnfreePredicate; | ||
"${variant}Support" = true; | ||
inHydra = true; | ||
}; | ||
}, | ||
... | ||
}@args: | ||
|
||
assert builtins.elem variant [ | ||
"cuda" | ||
"rocm" | ||
null | ||
]; | ||
|
||
let | ||
release-lib = import ./release-lib.nix { | ||
inherit supportedSystems nixpkgsArgs; | ||
}; | ||
|
||
inherit (release-lib) linux mapTestOn packagePlatforms pkgs; | ||
|
||
inherit (release-lib.lib) genAttrs; | ||
|
||
# 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" | ||
]; | ||
mkReleaseLib = import ./release-lib.nix; | ||
release-lib = mkReleaseLib ( | ||
{ inherit supportedSystems nixpkgsArgs; } // lib.intersectAttrs (lib.functionArgs mkReleaseLib) args | ||
); | ||
|
||
inherit (release-lib) | ||
linux | ||
mapTestOn | ||
packagePlatforms | ||
pkgs | ||
; | ||
|
||
# Package sets to evaluate whole | ||
packageSets = builtins.filter (lib.strings.hasPrefix "cudaPackages") (builtins.attrNames pkgs); | ||
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.torchWithCuda = linux; | ||
python3.pkgs.jaxlib = linux; | ||
}) // (genAttrs packageSets evalPackageSet)); | ||
|
||
in jobs | ||
jobs = | ||
mapTestOn { | ||
blas = linux; | ||
blender = linux; | ||
faiss = linux; | ||
lapack = linux; | ||
magma = linux; | ||
mpich = linux; | ||
openmpi = linux; | ||
ucx = linux; | ||
|
||
opencv = linux; | ||
cctag = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581 | ||
|
||
cholmod-extra = linux; | ||
colmap = linux; | ||
ctranslate2 = linux; | ||
deepin.image-editor = linux; | ||
ffmpeg-full = linux; | ||
gimp = linux; | ||
gpu-screen-recorder = linux; | ||
gst_all_1.gst-plugins-bad = linux; | ||
lightgbm = linux; | ||
llama-cpp = linux; | ||
meshlab = linux; | ||
monado = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581 | ||
noisetorch = linux; | ||
obs-studio-plugins.obs-backgroundremoval = linux; | ||
ollama = linux; | ||
onnxruntime = linux; | ||
openmvg = linux; | ||
openmvs = linux; | ||
opentrack = linux; | ||
openvino = linux; | ||
pixinsight = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581 | ||
qgis = linux; | ||
rtabmap = linux; | ||
saga = linux; | ||
suitesparse = linux; | ||
truecrack-cuda = linux; | ||
tts = linux; | ||
ueberzugpp = linux; # Failed in https://github.com/NixOS/nixpkgs/pull/233581 | ||
wyoming-faster-whisper = linux; | ||
xgboost = linux; | ||
|
||
python3Packages = { | ||
boxx = linux; | ||
bpycv = linux; | ||
caffe = linux; | ||
catboost = linux; | ||
chainer = linux; | ||
cupy = linux; | ||
faiss = linux; | ||
faster-whisper = linux; | ||
flax = linux; | ||
gpt-2-simple = linux; | ||
grad-cam = linux; | ||
jaxlib = linux; | ||
jax = linux; | ||
Keras = linux; | ||
kornia = linux; | ||
mmcv = linux; | ||
mxnet = linux; | ||
numpy = linux; # Only affected by MKL? | ||
onnx = linux; | ||
triton = linux; | ||
openai-whisper = linux; | ||
opencv4 = linux; | ||
opensfm = linux; | ||
pycuda = linux; | ||
pymc = linux; | ||
pyrealsense2WithCuda = linux; | ||
pytorch-lightning = linux; | ||
pytorch = linux; | ||
scikitimage = linux; | ||
scikit-learn = linux; # Only affected by MKL? | ||
scipy = linux; # Only affected by MKL? | ||
spacy-transformers = linux; | ||
tensorflow = linux; | ||
tensorflow-probability = linux; | ||
tesserocr = linux; | ||
Theano = linux; | ||
tiny-cuda-nn = linux; | ||
torchaudio = linux; | ||
torch = linux; | ||
torchvision = linux; | ||
transformers = linux; | ||
ttstokenizer = linux; | ||
vidstab = linux; | ||
}; | ||
} | ||
// (lib.genAttrs packageSets evalPackageSet); | ||
in | ||
jobs |