Merge pull request #267464 from Madouura/pr/rocmSupport-followup
treewide: use 'config.(cuda|rocm)Support'
This commit is contained in:
@@ -28,8 +28,16 @@
|
||||
, spfft
|
||||
, enableElpa ? false
|
||||
, elpa
|
||||
, gpuBackend ? "none"
|
||||
, cudaPackages
|
||||
, rocmPackages
|
||||
, config
|
||||
, gpuBackend ? (
|
||||
if config.cudaSupport
|
||||
then "cuda"
|
||||
else if config.rocmSupport
|
||||
then "rocm"
|
||||
else "none"
|
||||
)
|
||||
# gpuVersion needs to be set for both CUDA as well as ROCM hardware.
|
||||
# gpuArch is only required for the ROCM stack.
|
||||
# Change to a value suitable for your target GPU.
|
||||
@@ -37,7 +45,6 @@
|
||||
# and for Nvidia see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2i-cuda-optional-improved-performance-on-gpu-systems
|
||||
, gpuVersion ? "Mi100"
|
||||
, gpuArch ? "gfx908"
|
||||
, rocmPackages
|
||||
}:
|
||||
|
||||
assert builtins.elem gpuBackend [ "none" "cuda" "rocm" ];
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
, config
|
||||
, enableCuda ? config.cudaSupport
|
||||
, cudatoolkit
|
||||
, enableRocm ? false
|
||||
, enableRocm ? config.rocmSupport
|
||||
, rocmPackages
|
||||
}:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user