mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
cudaPackages_11_3.saxpy: fallback to the cudatoolkit runfile
This commit is contained in:
parent
182e6b41d0
commit
e084a6c648
|
@ -1,12 +1,13 @@
|
||||||
{ autoAddOpenGLRunpathHook
|
{ autoAddOpenGLRunpathHook
|
||||||
, backendStdenv
|
, backendStdenv
|
||||||
, cmake
|
, cmake
|
||||||
, cuda_cccl
|
, cuda_cccl ? null
|
||||||
, cuda_cudart
|
, cuda_cudart ? null
|
||||||
, cudaFlags
|
, cudaFlags
|
||||||
, cuda_nvcc
|
, cuda_nvcc ? null
|
||||||
|
, cudatoolkit ? null
|
||||||
, lib
|
, lib
|
||||||
, libcublas
|
, libcublas ? null
|
||||||
, setupCudaHook
|
, setupCudaHook
|
||||||
, stdenv
|
, stdenv
|
||||||
}:
|
}:
|
||||||
|
@ -17,23 +18,24 @@ backendStdenv.mkDerivation {
|
||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = lib.optionals (cuda_cudart != null) [
|
||||||
libcublas
|
libcublas
|
||||||
cuda_cudart
|
cuda_cudart
|
||||||
cuda_cccl
|
cuda_cccl
|
||||||
|
] ++ lib.optionals (cuda_cudart == null) [
|
||||||
|
cudatoolkit
|
||||||
];
|
];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
|
|
||||||
# NOTE: this needs to be pkgs.buildPackages.cudaPackages_XX_Y.cuda_nvcc for
|
|
||||||
# cross-compilation to work. This should work automatically once we move to
|
|
||||||
# spliced scopes. Delete this comment once that happens
|
|
||||||
cuda_nvcc
|
|
||||||
|
|
||||||
# Alternatively, we could remove the propagated hook from cuda_nvcc and add
|
# Alternatively, we could remove the propagated hook from cuda_nvcc and add
|
||||||
# directly:
|
# directly:
|
||||||
# setupCudaHook
|
# setupCudaHook
|
||||||
autoAddOpenGLRunpathHook
|
autoAddOpenGLRunpathHook
|
||||||
|
] ++ lib.optionals (cuda_nvcc != null) [
|
||||||
|
cuda_nvcc
|
||||||
|
] ++ lib.optionals (cuda_nvcc == null) [
|
||||||
|
cudatoolkit
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
|
Loading…
Reference in a new issue