3
0
Fork 0
forked from mirrors/nixpkgs

tests.cude.cuda-library-samples.cutensor: init at same version as others

This commit is contained in:
John Ericson 2021-03-12 15:06:09 -05:00
parent 05efe64c1b
commit a680b02816
2 changed files with 26 additions and 0 deletions

View file

@ -1,16 +1,20 @@
{ callPackage
, cudatoolkit_10_1, cudatoolkit_10_2
, cudatoolkit_11_0, cudatoolkit_11_1, cudatoolkit_11_2
, cutensor_cudatoolkit_10_1, cutensor_cudatoolkit_10_2
, cutensor_cudatoolkit_11_0, cutensor_cudatoolkit_11_1, cutensor_cudatoolkit_11_2
}:
rec {
cuda-library-samples_cudatoolkit_10_1 = callPackage ./generic.nix {
cudatoolkit = cudatoolkit_10_1;
cutensor_cudatoolkit = cutensor_cudatoolkit_10_1;
};
cuda-library-samples_cudatoolkit_10_2 = callPackage ./generic.nix {
cudatoolkit = cudatoolkit_10_2;
cutensor_cudatoolkit = cutensor_cudatoolkit_10_2;
};
cuda-library-samples_cudatoolkit_10 =
@ -20,14 +24,17 @@ rec {
cuda-library-samples_cudatoolkit_11_0 = callPackage ./generic.nix {
cudatoolkit = cudatoolkit_11_0;
cutensor_cudatoolkit = cutensor_cudatoolkit_11_0;
};
cuda-library-samples_cudatoolkit_11_1 = callPackage ./generic.nix {
cudatoolkit = cudatoolkit_11_1;
cutensor_cudatoolkit = cutensor_cudatoolkit_11_1;
};
cuda-library-samples_cudatoolkit_11_2 = callPackage ./generic.nix {
cudatoolkit = cudatoolkit_11_2;
cutensor_cudatoolkit = cutensor_cudatoolkit_11_2;
};
cuda-library-samples_cudatoolkit_11 =

View file

@ -1,6 +1,7 @@
{ lib, stdenv, fetchFromGitHub
, cmake, addOpenGLRunpath
, cudatoolkit
, cutensor_cudatoolkit
}:
let
@ -48,4 +49,22 @@ in
sourceRoot = "cuSOLVER/gesv";
});
cutensor = stdenv.mkDerivation (commonAttrs // {
pname = "cuda-library-samples-cutensor";
src = "${src}/cuTENSOR";
cmakeFlags = [
"-DCUTENSOR_EXAMPLE_BINARY_INSTALL_DIR=${builtins.placeholder "out"}/bin"
];
# CUTENSOR_ROOT is double escaped
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "\''${CUTENSOR_ROOT}/include" "${cutensor_cudatoolkit.dev}/include"
'';
CUTENSOR_ROOT = cutensor_cudatoolkit;
});
}