tests.cude.cuda-library-samples.{cublas,cusolver}: init at master
Well, strictly speaking, master + https://github.com/NVIDIA/CUDALibrarySamples/pull/29
This commit is contained in:
parent
23f815f12c
commit
c1ced05ec4
3 changed files with 96 additions and 0 deletions
35
pkgs/test/cuda/cuda-library-samples/default.nix
Normal file
35
pkgs/test/cuda/cuda-library-samples/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ callPackage
|
||||
, cudatoolkit_10_1, cudatoolkit_10_2
|
||||
, cudatoolkit_11_0, cudatoolkit_11_1, cudatoolkit_11_2
|
||||
}:
|
||||
|
||||
rec {
|
||||
|
||||
cuda-library-samples_cudatoolkit_10_1 = callPackage ./generic.nix {
|
||||
cudatoolkit = cudatoolkit_10_1;
|
||||
};
|
||||
|
||||
cuda-library-samples_cudatoolkit_10_2 = callPackage ./generic.nix {
|
||||
cudatoolkit = cudatoolkit_10_2;
|
||||
};
|
||||
|
||||
cuda-library-samples_cudatoolkit_10 =
|
||||
cuda-library-samples_cudatoolkit_10_2;
|
||||
|
||||
##
|
||||
|
||||
cuda-library-samples_cudatoolkit_11_0 = callPackage ./generic.nix {
|
||||
cudatoolkit = cudatoolkit_11_0;
|
||||
};
|
||||
|
||||
cuda-library-samples_cudatoolkit_11_1 = callPackage ./generic.nix {
|
||||
cudatoolkit = cudatoolkit_11_1;
|
||||
};
|
||||
|
||||
cuda-library-samples_cudatoolkit_11_2 = callPackage ./generic.nix {
|
||||
cudatoolkit = cudatoolkit_11_2;
|
||||
};
|
||||
|
||||
cuda-library-samples_cudatoolkit_11 =
|
||||
cuda-library-samples_cudatoolkit_11_2;
|
||||
}
|
51
pkgs/test/cuda/cuda-library-samples/generic.nix
Normal file
51
pkgs/test/cuda/cuda-library-samples/generic.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, cmake, addOpenGLRunpath
|
||||
, cudatoolkit
|
||||
}:
|
||||
|
||||
let
|
||||
rev = "5aab680905d853bce0dbad4c488e4f7e9f7b2302";
|
||||
src = fetchFromGitHub {
|
||||
owner = "NVIDIA";
|
||||
repo = "CUDALibrarySamples";
|
||||
inherit rev;
|
||||
sha256 = "0gwgbkq05ygrfgg5hk07lmap7n7ampxv0ha1axrv8qb748ph81xs";
|
||||
};
|
||||
commonAttrs = {
|
||||
version = lib.strings.substring 0 7 rev + "-" + lib.versions.majorMinor cudatoolkit.version;
|
||||
nativeBuildInputs = [ cmake addOpenGLRunpath ];
|
||||
buildInputs = [ cudatoolkit ];
|
||||
enableParallelBuilding = true;
|
||||
postFixup = ''
|
||||
for exe in $out/bin/*; do
|
||||
addOpenGLRunpath $exe
|
||||
done
|
||||
'';
|
||||
meta = {
|
||||
description = "examples of using libraries using CUDA";
|
||||
longDescription = ''
|
||||
CUDA Library Samples contains examples demonstrating the use of
|
||||
features in the math and image processing libraries cuBLAS, cuTENSOR,
|
||||
cuSPARSE, cuSOLVER, cuFFT, cuRAND, NPP and nvJPEG.
|
||||
'';
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ obsidian-systems-maintainence ];
|
||||
};
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
cublas = stdenv.mkDerivation (commonAttrs // {
|
||||
pname = "cuda-library-samples-cublas";
|
||||
|
||||
src = "${src}/cuBLASLt";
|
||||
});
|
||||
|
||||
cusolver = stdenv.mkDerivation (commonAttrs // {
|
||||
pname = "cuda-library-samples-cusolver";
|
||||
|
||||
src = "${src}/cuSOLVER";
|
||||
|
||||
sourceRoot = "cuSOLVER/gesv";
|
||||
});
|
||||
}
|
|
@ -13,4 +13,14 @@ rec {
|
|||
cuda-samples_cudatoolkit_11_0
|
||||
cuda-samples_cudatoolkit_11_1
|
||||
cuda-samples_cudatoolkit_11_2;
|
||||
|
||||
cuda-library-samplesPackages = callPackage ./cuda-library-samples { };
|
||||
inherit (cuda-library-samplesPackages)
|
||||
cuda-library-samples_cudatoolkit_10
|
||||
cuda-library-samples_cudatoolkit_10_1
|
||||
cuda-library-samples_cudatoolkit_10_2
|
||||
cuda-library-samples_cudatoolkit_11
|
||||
cuda-library-samples_cudatoolkit_11_0
|
||||
cuda-library-samples_cudatoolkit_11_1
|
||||
cuda-library-samples_cudatoolkit_11_2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue