summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-08-13 14:17:54 +0200
committerGitHub <noreply@github.com>2024-08-13 14:17:54 +0200
commitb693987f9579e0c1a07a54692a054a833c981f37 (patch)
treebcefe28dd63f218702cb174c77228aa3392f5536
parent79996868563ba2580de1645767c52046f2a0aa0e (diff)
downloadspack-b693987f9579e0c1a07a54692a054a833c981f37.tar.gz
spack-b693987f9579e0c1a07a54692a054a833c981f37.tar.bz2
spack-b693987f9579e0c1a07a54692a054a833c981f37.tar.xz
spack-b693987f9579e0c1a07a54692a054a833c981f37.zip
cuda: drop preference (#45130)
-rw-r--r--var/spack/repos/builtin/packages/cuda/package.py9
-rw-r--r--var/spack/repos/builtin/packages/xgboost/package.py28
2 files changed, 25 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py
index dce84006cf..404b85a61c 100644
--- a/var/spack/repos/builtin/packages/cuda/package.py
+++ b/var/spack/repos/builtin/packages/cuda/package.py
@@ -23,7 +23,6 @@ from spack.package import *
# - 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.5.1": {
"Linux-aarch64": (
@@ -629,13 +628,9 @@ class Cuda(Package):
skip_version_audit = ["platform=darwin", "platform=windows"]
for ver, packages in _versions.items():
- key = "{0}-{1}".format(platform.system(), platform.machine())
- pkg = packages.get(key)
+ pkg = packages.get(f"{platform.system()}-{platform.machine()}")
if pkg:
- 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)
+ 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
diff --git a/var/spack/repos/builtin/packages/xgboost/package.py b/var/spack/repos/builtin/packages/xgboost/package.py
index bfc451f835..3451f7af69 100644
--- a/var/spack/repos/builtin/packages/xgboost/package.py
+++ b/var/spack/repos/builtin/packages/xgboost/package.py
@@ -25,6 +25,12 @@ class Xgboost(CMakePackage, CudaPackage):
version("master", branch="master", submodules=True)
version(
+ "2.1.0", tag="v2.1.0", commit="213ebf7796b757448dfa2cfba532074696fa1524", submodules=True
+ )
+ version(
+ "1.7.6", tag="v1.7.6", commit="36eb41c960483c8b52b44082663c99e6a0de440a", submodules=True
+ )
+ version(
"1.6.2", tag="v1.6.2", commit="b9934246faa9a25e10a12339685dfbe56d56f70b", submodules=True
)
version(
@@ -43,11 +49,23 @@ class Xgboost(CMakePackage, CudaPackage):
variant("nccl", default=False, description="Build with NCCL to enable distributed GPU support")
variant("openmp", default=True, description="Build with OpenMP support")
- depends_on("cmake@3.13:", type="build")
- depends_on("cmake@3.16:", when="platform=darwin", type="build")
- depends_on("cuda@10:", when="+cuda")
- # https://github.com/dmlc/xgboost/pull/7379
- depends_on("cuda@10:11.4", when="@:1.5.0+cuda")
+ with default_args(type="build"):
+ depends_on("cmake@3.16:", when="platform=darwin") # openmp issues
+ depends_on("cmake@3.13:")
+ depends_on("cmake@3.14:", when="@1.5:")
+ depends_on("cmake@3.18:", when="@2:")
+
+ with when("+cuda"):
+ depends_on("cuda@10:")
+ # https://github.com/dmlc/xgboost/pull/7379
+ depends_on("cuda@:11.4", when="@:1.5.0")
+ # https://github.com/dmlc/xgboost/commit/ca0547bb65966896254a99f7868943d606a18c53
+ depends_on("cuda@:11", when="@:1.6")
+ # thrust 2.3.1 tuple issues
+ depends_on("cuda@:12.3", when="@:1.7")
+ # https://github.com/dmlc/xgboost/issues/10555
+ depends_on("cuda@:12.4", when="@:2.1.0") # assuming fix is backported
+
depends_on("nccl", when="+nccl")
depends_on("llvm-openmp", when="%apple-clang +openmp")
depends_on("hwloc", when="%clang")