From 3bd19bc4ef76826274bd0ef7d0899fa97d8990cb Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 8 Jan 2024 20:25:56 +0100 Subject: [PATCH 1/2] spfft: fix CUDA build --- pkgs/by-name/sp/spfft/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/sp/spfft/package.nix b/pkgs/by-name/sp/spfft/package.nix index 55b20defd53c1..832b9d75a5f8e 100644 --- a/pkgs/by-name/sp/spfft/package.nix +++ b/pkgs/by-name/sp/spfft/package.nix @@ -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 From 8156485148b0c9080e5fc22153a038aa4a096245 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Mon, 8 Jan 2024 20:26:09 +0100 Subject: [PATCH 2/2] sirius: fix CUDA build --- pkgs/by-name/si/sirius/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/si/sirius/package.nix b/pkgs/by-name/si/sirius/package.nix index 8518092203b8e..ee6052cf09c16 100644 --- a/pkgs/by-name/si/sirius/package.nix +++ b/pkgs/by-name/si/sirius/package.nix @@ -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