cuda: add v12.9 and new Blackwell targets (#50284)

* cuda: Add 12.9 and new Blackwell targets

Including family-specific architecture features like sm_100f

* tau, caliper: Add cuda v12.9 conflict

Legacy nvtx was dropped.

* petsc: "libnvToolsExt.a" -> "libnvtx3interop.a" for cuda@12.9: and petsc@:3.23.1

* legion: Add upper bound to cuda version range

Avoid build failure due to CUDA driver API incompatibility.
See https://github.com/StanfordLegion/legion/issues/1864

---------

Co-authored-by: Satish Balay <balay@mcs.anl.gov>
This commit is contained in:
pauleonix 2025-05-16 15:17:50 +02:00 committed by GitHub
parent b8c31b22a5
commit 4d55fe6284
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 45 additions and 7 deletions

View File

@ -49,10 +49,19 @@ class CudaPackage(PackageBase):
"90a",
"100",
"100a",
"100f",
"101",
"101a",
"101f",
"103",
"103a",
"103f",
"120",
"120a",
"120f",
"121",
"121a",
"121f",
)
# FIXME: keep cuda and cuda_arch separate to make usage easier until
@ -155,6 +164,15 @@ def compute_capabilities(arch_list: Iterable[str]) -> List[str]:
depends_on("cuda@12.8:", when="cuda_arch=101a")
depends_on("cuda@12.8:", when="cuda_arch=120")
depends_on("cuda@12.8:", when="cuda_arch=120a")
depends_on("cuda@12.9:", when="cuda_arch=100f")
depends_on("cuda@12.9:", when="cuda_arch=101f")
depends_on("cuda@12.9:", when="cuda_arch=120f")
depends_on("cuda@12.9:", when="cuda_arch=103")
depends_on("cuda@12.9:", when="cuda_arch=103a")
depends_on("cuda@12.9:", when="cuda_arch=103f")
depends_on("cuda@12.9:", when="cuda_arch=121")
depends_on("cuda@12.9:", when="cuda_arch=121a")
depends_on("cuda@12.9:", when="cuda_arch=121f")
# From the NVIDIA install guide we know of conflicts for particular
# platforms (linux, darwin), architectures (x86, powerpc) and compilers
# (gcc, clang). We don't restrict %gcc and %clang conflicts to
@ -186,7 +204,7 @@ def compute_capabilities(arch_list: Iterable[str]) -> List[str]:
conflicts("%gcc@12:", when="+cuda ^cuda@:11.8")
conflicts("%gcc@13:", when="+cuda ^cuda@:12.3")
conflicts("%gcc@14:", when="+cuda ^cuda@:12.6")
conflicts("%gcc@15:", when="+cuda ^cuda@:12.8")
conflicts("%gcc@15:", when="+cuda ^cuda@:12.9")
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")
@ -195,7 +213,7 @@ def compute_capabilities(arch_list: Iterable[str]) -> List[str]:
conflicts("%clang@17:", when="+cuda ^cuda@:12.3")
conflicts("%clang@18:", when="+cuda ^cuda@:12.5")
conflicts("%clang@19:", when="+cuda ^cuda@:12.6")
conflicts("%clang@20:", when="+cuda ^cuda@:12.8")
conflicts("%clang@20:", when="+cuda ^cuda@:12.9")
# https://gist.github.com/ax3l/9489132#gistcomment-3860114
conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0")

View File

@ -137,6 +137,8 @@ class Caliper(CachedCMakePackage, CudaPackage, ROCmPackage):
conflicts("+libdw", "@:2.4")
conflicts("+rocm", "@:2.7")
conflicts("+rocm+cuda")
# Legacy nvtx is only supported until cuda@12.8, newer cuda only provides nvtx3.
conflicts("^cuda@12.9:", "@:2.12.1")
patch("for_aarch64.patch", when="@:2.11 target=aarch64:")
patch(

View File

@ -21,6 +21,16 @@
# format returned by platform.system() and 'arch' by platform.machine()
_versions = {
"12.9.0": {
"Linux-aarch64": (
"f3b7ae71f95d11de0a03ccfa1c0aff7be336d2199b50b1a15b03695fd15a6409",
"https://developer.download.nvidia.com/compute/cuda/12.9.0/local_installers/cuda_12.9.0_575.51.03_linux_sbsa.run",
),
"Linux-x86_64": (
"bbce2b760fe2096ca1c86f729e03bf377c1519add7b2755ecc4e9b0a9e07ee43",
"https://developer.download.nvidia.com/compute/cuda/12.9.0/local_installers/cuda_12.9.0_575.51.03_linux.run",
),
},
"12.8.1": {
"Linux-aarch64": (
"353cbab1b57282a1001071796efd95c1e40ec27a3375e854d12637eaa1c6107c",

View File

@ -121,10 +121,10 @@ class Legion(CMakePackage, ROCmPackage):
depends_on("mpi", when="conduit=mpi")
depends_on("cuda@10.0:11.9", when="+cuda_unsupported_compiler @21.03.0:23.03.0")
depends_on("cuda@10.0:11.9", when="+cuda @21.03.0:23.03.0")
depends_on("cuda@11.7:", when="+cuda_unsupported_compiler @23.06.0:")
depends_on("cuda@11.7:", when="+cuda @23.06.0:")
depends_on("cuda@11.7:", when="+cuda_unsupported_compiler @stable")
depends_on("cuda@11.7:", when="+cuda @stable")
depends_on("cuda@11.7:12.8", when="+cuda_unsupported_compiler @23.06.0:")
depends_on("cuda@11.7:12.8", when="+cuda @23.06.0:")
depends_on("cuda@11.7:12.8", when="+cuda_unsupported_compiler @stable")
depends_on("cuda@11.7:12.8", when="+cuda @stable")
depends_on("hip@5.1:5.7", when="+rocm @23.03.0:23.12.0")
depends_on("hip@5.1:", when="+rocm")
depends_on("hdf5", when="+hdf5")

View File

@ -750,6 +750,13 @@ def revert_kokkos_nvcc_wrapper(self):
env["MPICXX_CXX"] = env["CXX"]
def configure(self, spec, prefix):
if spec.satisfies("@:3.23.1 +cuda ^cuda@12.9:"):
filter_file(
"libnvToolsExt.a",
"libnvtx3interop.a",
"config/BuildSystem/config/packages/cuda.py",
string=True,
)
self.revert_kokkos_nvcc_wrapper()
python("configure", "--prefix=%s" % prefix, *self.configure_options())

View File

@ -159,7 +159,8 @@ class Tau(Package):
depends_on("python@:3.10", when="@:2.32.1")
depends_on("libunwind", when="+libunwind")
depends_on("mpi", when="+mpi", type=("build", "run", "link"))
depends_on("cuda", when="+cuda")
# Legacy nvtx is only supported until cuda@12.8, newer cuda only provides nvtx3.
depends_on("cuda@:12.8", when="+cuda")
depends_on("gasnet", when="+gasnet")
depends_on("adios2", when="+adios2")
depends_on("sqlite", when="+sqlite")