Add CUDA 12.0 (#34664)

This commit is contained in:
Wileam Y. Phan 2023-01-10 05:51:23 -05:00 committed by GitHub
parent 9283a94ee4
commit 0f7f600d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 6 deletions

View File

@ -137,10 +137,11 @@ def cuda_flags(arch_list):
conflicts("%gcc@11:", when="+cuda ^cuda@:11.4.0")
conflicts("%gcc@11.2:", when="+cuda ^cuda@:11.5")
conflicts("%gcc@12:", when="+cuda ^cuda@:11.8")
conflicts("%gcc@13:", when="+cuda ^cuda@:12.0")
conflicts("%clang@12:", when="+cuda ^cuda@:11.4.0")
conflicts("%clang@13:", when="+cuda ^cuda@:11.5")
conflicts("%clang@14:", when="+cuda ^cuda@:11.7")
conflicts("%clang@15:", when="+cuda ^cuda@:11.8")
conflicts("%clang@15:", when="+cuda ^cuda@:12.0")
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0")

View File

@ -24,23 +24,23 @@ spack:
mpi:
- openmpi
- mpich
variants: +mpi
variants: +mpi cuda_arch=70
definitions:
- radiuss:
- ascent
- blt
- caliper
- caliper +cuda cuda_arch=70
- caliper +cuda
- camp
- camp +cuda
- chai
- chai +cuda +raja
- mfem
- mfem +superlu-dist+petsc+sundials
- mfem +cuda cuda_arch=70 ^hypre+cuda
- mfem +cuda ^hypre+cuda
- raja
- raja +cuda cuda_arch=70
- raja +cuda
- umpire
- umpire +cuda

View File

@ -23,7 +23,22 @@
# - package key must be in the form '{os}-{arch}' where 'os' is in the
# format returned by platform.system() and 'arch' by platform.machine()
preferred_ver = "11.8.0"
_versions = {
"12.0.0": {
"Linux-aarch64": (
"cd13e9c65d4c8f895a968706f46064d536be09f9706bce081cc864b7e4fa4544",
"https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux_sbsa.run",
),
"Linux-x86_64": (
"905e9b9516900839fb76064719db752439f38b8cb730b49335d8bd53ddfad392",
"https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux.run",
),
"Linux-ppc64le": (
"117fe045c71668e45d41c6119b6f27875370c78e33fc56795b6fe014c796ec60",
"https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda_12.0.0_525.60.13_linux_ppc64le.run",
),
},
"11.8.0": {
"Linux-aarch64": (
"e6e9a8d31163c9776b5e313fd7590877c5684e1ecddee741154f95704d4ed27c",
@ -441,7 +456,10 @@ class Cuda(Package):
key = "{0}-{1}".format(platform.system(), platform.machine())
pkg = packages.get(key)
if pkg:
version(ver, sha256=pkg[0], url=pkg[1], expand=False)
if ver == preferred_ver:
version(ver, sha256=pkg[0], url=pkg[1], expand=False, preferred=True)
else:
version(ver, sha256=pkg[0], url=pkg[1], expand=False)
# macOS Mojave drops NVIDIA graphics card support -- official NVIDIA
# drivers do not exist for Mojave. See

View File

@ -110,6 +110,9 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage):
when="+umpire+rocm amdgpu_target={0}".format(gfx),
)
# Uses deprecated cuSPARSE functions/types (e.g. csrsv2Info_t).
depends_on("cuda@:11", when="+cuda")
# Conflicts
conflicts("+cuda", when="+int64")
conflicts("+rocm", when="+int64")