Merge pull request #95727 from obsidiansystems/cuda11

cudatoolkit: init v11.0.3
This commit is contained in:
Benjamin Hipple 2020-08-26 15:09:08 -04:00 committed by GitHub
commit d41c129198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 61 additions and 10 deletions

View File

@ -95,12 +95,33 @@ stdenv.mkDerivation rec {
cd ..
done
''}
${lib.optionalString (lib.versionAtLeast version "10.1") ''
${lib.optionalString (lib.versionAtLeast version "10.1" && lib.versionOlder version "11") ''
cd pkg/builds/cuda-toolkit
mv * $out/
''}
${lib.optionalString (lib.versionAtLeast version "11") ''
mkdir -p $out/bin $out/lib64 $out/include $out/doc
for dir in pkg/builds/* pkg/builds/cuda_nvcc/nvvm pkg/builds/cuda_cupti/extras/CUPTI; do
if [ -d $dir/bin ]; then
mv $dir/bin/* $out/bin
fi
if [ -d $dir/doc ]; then
(cd $dir/doc && find . -type d -exec mkdir -p $out/doc/\{} \;)
(cd $dir/doc && find . \( -type f -o -type l \) -exec mv \{} $out/doc/\{} \;)
fi
if [ -L $dir/include ] || [ -d $dir/include ]; then
(cd $dir/include && find . -type d -exec mkdir -p $out/include/\{} \;)
(cd $dir/include && find . \( -type f -o -type l \) -exec mv \{} $out/include/\{} \;)
fi
if [ -L $dir/lib64 ] || [ -d $dir/lib64 ]; then
(cd $dir/lib64 && find . -type d -exec mkdir -p $out/lib64/\{} \;)
(cd $dir/lib64 && find . \( -type f -o -type l \) -exec mv \{} $out/lib64/\{} \;)
fi
done
mv pkg/builds/cuda_nvcc/nvvm $out/nvvm
''}
rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
rm -f $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
${lib.optionalString (lib.versionOlder version "10.1") ''
# let's remove the 32-bit libraries, they confuse the lib64->lib mover
@ -152,7 +173,7 @@ stdenv.mkDerivation rec {
'';
postInstall = ''
for b in nvvp nsight; do
for b in nvvp ${lib.optionalString (lib.versionOlder version "11") "nsight"}; do
wrapProgram "$out/bin/$b" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
done

View File

@ -4,6 +4,7 @@
, gcc48
, gcc6
, gcc7
, gcc9
}:
let
@ -136,4 +137,14 @@ in rec {
};
cudatoolkit_10 = cudatoolkit_10_2;
cudatoolkit_11_0 = common {
version = "11.0.3";
url = "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run";
sha256 = "1h4c69nfrgm09jzv8xjnjcvpq8n4gnlii17v3wzqry5d13jc8ydh";
gcc = gcc9;
};
cudatoolkit_11 = cudatoolkit_11_0;
}

View File

@ -1,4 +1,4 @@
{ callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0, cudatoolkit_10_1, cudatoolkit_10_2 }:
{ callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0, cudatoolkit_10_1, cudatoolkit_10_2, cudatoolkit_11_0 }:
let
generic = args: callPackage (import ./generic.nix (removeAttrs args ["cudatoolkit"])) {
@ -80,4 +80,13 @@ in rec {
};
cudnn_cudatoolkit_10 = cudnn_cudatoolkit_10_1;
cudnn_cudatoolkit_11_0 = generic rec {
version = "8.0.2";
cudatoolkit = cudatoolkit_11_0;
srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v8.0.2.39.tgz";
sha256 = "0ib3v3bgcdxarqapkxngw1nwl0c2a7zz392ns7w9ipcficl4cbv7";
};
cudnn_cudatoolkit_11 = cudnn_cudatoolkit_11_0;
}

View File

@ -32,6 +32,13 @@ stdenv.mkDerivation {
mkdir -p $out
cp -a include $out/include
cp -a lib64 $out/lib64
${lib.optionalString (lib.versionAtLeast version "8") ''
# patchelf fails on libcudnn_cnn_infer due to it being too big.
# I'm hoping it's not needed for most programs.
# (https://github.com/NixOS/patchelf/issues/222)
rm -f $out/lib64/libcudnn_cnn_infer*
''}
'';
# Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found.

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "nccl-${version}-cuda-${cudatoolkit.majorVersion}";
version = "2.4.8-1";
version = "2.7.8-1";
src = fetchFromGitHub {
owner = "NVIDIA";
repo = "nccl";
rev = "v${version}";
sha256 = "05m66y64rgsdyybvjybhy6clikwv438b1m484ikai78fb2b7mvyq";
sha256 = "0xxiwaw239dc9g015fka3k1nvm5zyl00dzgxnwzkang61dys9wln";
};
outputs = [ "out" "dev" ];

View File

@ -2915,7 +2915,9 @@ in
cudatoolkit_10
cudatoolkit_10_0
cudatoolkit_10_1
cudatoolkit_10_2;
cudatoolkit_10_2
cudatoolkit_11
cudatoolkit_11_0;
cudatoolkit = cudatoolkit_10;
@ -2932,7 +2934,9 @@ in
cudnn_cudatoolkit_10
cudnn_cudatoolkit_10_0
cudnn_cudatoolkit_10_1
cudnn_cudatoolkit_10_2;
cudnn_cudatoolkit_10_2
cudnn_cudatoolkit_11
cudnn_cudatoolkit_11_0;
cudnn = cudnn_cudatoolkit_10;
@ -5566,9 +5570,8 @@ in
xnbd = callPackage ../tools/networking/xnbd { };
nccl = callPackage ../development/libraries/science/math/nccl { };
nccl_cudatoolkit_9_0 = nccl.override { cudatoolkit = cudatoolkit_9_0; };
nccl_cudatoolkit_9 = nccl.override { cudatoolkit = cudatoolkit_9; };
nccl_cudatoolkit_10 = nccl.override { cudatoolkit = cudatoolkit_10; };
nccl_cudatoolkit_11 = nccl.override { cudatoolkit = cudatoolkit_11; };
ndjbdns = callPackage ../tools/networking/ndjbdns { };