about summary refs log tree commit diff
path: root/pkgs/by-name/sp
diff options
context:
space:
mode:
authorMadoura <madouura@gmail.com>2023-11-14 08:41:58 -0600
committerMadoura <madouura@gmail.com>2023-11-14 08:44:42 -0600
commit9709e96e1e62b925e9f68809040913169fe07d74 (patch)
tree46b75facec5049836bbb4369b34c70d001a71793 /pkgs/by-name/sp
parent242544ca1716350725294bbb347d3bd039d1a0e8 (diff)
downloadnixlib-9709e96e1e62b925e9f68809040913169fe07d74.tar
nixlib-9709e96e1e62b925e9f68809040913169fe07d74.tar.gz
nixlib-9709e96e1e62b925e9f68809040913169fe07d74.tar.bz2
nixlib-9709e96e1e62b925e9f68809040913169fe07d74.tar.lz
nixlib-9709e96e1e62b925e9f68809040913169fe07d74.tar.xz
nixlib-9709e96e1e62b925e9f68809040913169fe07d74.tar.zst
nixlib-9709e96e1e62b925e9f68809040913169fe07d74.zip
treewide: make 'gpuBackend' use 'config.(cuda|rocm)Support'
Diffstat (limited to 'pkgs/by-name/sp')
-rw-r--r--pkgs/by-name/sp/spfft/package.nix9
-rw-r--r--pkgs/by-name/sp/spla/package.nix9
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 72ae473d14a5..55b20defd53c 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 1f8abde4b723..210fb04af9b8 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" ];