Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.8 kB · 79 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980{ _cuda, cudaNamePrefix, lib, runCommand,}:let inherit (builtins) deepSeq toJSON tryEval; inherit (_cuda.bootstrapData) cudaCapabilityToInfo; inherit (_cuda.lib) formatCapabilities; inherit (lib.asserts) assertMsg;in# When changing names or formats: pause, validate, and update the assertassert assertMsg ( cudaCapabilityToInfo ? "7.5" && cudaCapabilityToInfo ? "8.6") "The following test requires both 7.5 and 8.6 be known CUDA capabilities";assert let expected = { cudaCapabilities = [ "7.5" "8.6" ]; cudaForwardCompat = true;
# Sorted alphabetically archNames = [ "Ampere" "Turing" ];
realArches = [ "sm_75" "sm_86" ];
virtualArches = [ "compute_75" "compute_86" ];
arches = [ "sm_75" "sm_86" "compute_86" ];
gencode = [ "-gencode=arch=compute_75,code=sm_75" "-gencode=arch=compute_86,code=sm_86" "-gencode=arch=compute_86,code=compute_86" ];
gencodeString = "-gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_86,code=compute_86";
cmakeCudaArchitecturesString = "75;86"; }; actual = formatCapabilities { inherit cudaCapabilityToInfo; cudaCapabilities = [ "7.5" "8.6" ]; cudaForwardCompat = true; }; actualWrapped = (tryEval (deepSeq actual actual)).value; in assertMsg (expected == actualWrapped) '' Expected: ${toJSON expected} Actual: ${toJSON actualWrapped} '';runCommand "${cudaNamePrefix}-tests-flags" { __structuredAttrs = true; strictDeps = true; } '' touch "$out" ''