3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #279660 from markuskowa/fix-spfft-sirius

spfft,sirius: fix CUDA build
This commit is contained in:
markuskowa 2024-01-09 10:52:46 +01:00 committed by GitHub
commit 1e4909f24b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View file

@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
cmake
gfortran
pkg-config
];
] ++ lib.optional (gpuBackend == "cuda") cudaPackages.cuda_nvcc;
buildInputs = [
blas
@ -72,8 +72,12 @@ stdenv.mkDerivation rec {
eigen
libvdwxc
]
++ lib.optional (gpuBackend == "cuda") cudaPackages.cudatoolkit
++ lib.optionals (gpuBackend == "rocm") [
++ lib.optionals (gpuBackend == "cuda") [
cudaPackages.cuda_cudart
cudaPackages.cuda_profiler_api
cudaPackages.cudatoolkit
cudaPackages.libcublas
] ++ lib.optionals (gpuBackend == "rocm") [
rocmPackages.clr
rocmPackages.rocblas
] ++ lib.optional stdenv.isDarwin llvmPackages.openmp

View file

@ -34,13 +34,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
gfortran
];
] ++ lib.optional (gpuBackend == "cuda") cudaPackages.cuda_nvcc;
buildInputs = [
fftw
]
++ lib.optional (gpuBackend == "cuda") cudaPackages.cudatoolkit
++ lib.optionals (gpuBackend == "rocm") [
] ++ lib.optionals (gpuBackend == "cuda") [
cudaPackages.libcufft
cudaPackages.cuda_cudart
] ++ lib.optionals (gpuBackend == "rocm") [
rocmPackages.clr
rocmPackages.rocfft
rocmPackages.hipfft