diff options
author | Madoura <madouura@gmail.com> | 2023-11-14 08:41:58 -0600 |
---|---|---|
committer | Madoura <madouura@gmail.com> | 2023-11-14 08:44:42 -0600 |
commit | 9709e96e1e62b925e9f68809040913169fe07d74 (patch) | |
tree | 46b75facec5049836bbb4369b34c70d001a71793 /pkgs/by-name/sp | |
parent | 242544ca1716350725294bbb347d3bd039d1a0e8 (diff) |
treewide: make 'gpuBackend' use 'config.(cuda|rocm)Support'
Diffstat (limited to 'pkgs/by-name/sp')
-rw-r--r-- | pkgs/by-name/sp/spfft/package.nix | 9 | ||||
-rw-r--r-- | pkgs/by-name/sp/spla/package.nix | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/by-name/sp/spfft/package.nix b/pkgs/by-name/sp/spfft/package.nix index 72ae473d14a5f..55b20defd53c1 100644 --- a/pkgs/by-name/sp/spfft/package.nix +++ b/pkgs/by-name/sp/spfft/package.nix @@ -6,9 +6,16 @@ , mpi , gfortran , llvmPackages -, gpuBackend ? "none" , cudaPackages , rocmPackages +, config +, gpuBackend ? ( + if config.cudaSupport + then "cuda" + else if config.rocmSupport + then "rocm" + else "none" +) }: assert builtins.elem gpuBackend [ "none" "cuda" "rocm" ]; diff --git a/pkgs/by-name/sp/spla/package.nix b/pkgs/by-name/sp/spla/package.nix index 1f8abde4b7230..210fb04af9b80 100644 --- a/pkgs/by-name/sp/spla/package.nix +++ b/pkgs/by-name/sp/spla/package.nix @@ -6,9 +6,16 @@ , blas , gfortran , llvmPackages -, gpuBackend ? "none" , cudaPackages , rocmPackages +, config +, gpuBackend ? ( + if config.cudaSupport + then "cuda" + else if config.rocmSupport + then "rocm" + else "none" +) }: assert builtins.elem gpuBackend [ "none" "cuda" "rocm" ]; |