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 | |
parent | 242544ca1716350725294bbb347d3bd039d1a0e8 (diff) |
treewide: make 'gpuBackend' use 'config.(cuda|rocm)Support'
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/si/sirius/package.nix | 9 | ||||
-rw-r--r-- | pkgs/by-name/sp/spfft/package.nix | 9 | ||||
-rw-r--r-- | pkgs/by-name/sp/spla/package.nix | 9 |
3 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/by-name/si/sirius/package.nix b/pkgs/by-name/si/sirius/package.nix index 2af3c28de9221..8518092203b8e 100644 --- a/pkgs/by-name/si/sirius/package.nix +++ b/pkgs/by-name/si/sirius/package.nix @@ -21,9 +21,16 @@ , eigen , libvdwxc , 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/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" ]; |