summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2024-06-07 08:16:59 -0700
committerGitHub <noreply@github.com>2024-06-07 08:16:59 -0700
commita18adf74bf7cd22c88aa0aec2db2cf7ea0904bc4 (patch)
tree32aa3f5dbb7979945b7417646ca5ec010a7d37fe
parent6426ab1b7ed3fb63237ec77d4702c09200adfc4f (diff)
downloadspack-a18adf74bf7cd22c88aa0aec2db2cf7ea0904bc4.tar.gz
spack-a18adf74bf7cd22c88aa0aec2db2cf7ea0904bc4.tar.bz2
spack-a18adf74bf7cd22c88aa0aec2db2cf7ea0904bc4.tar.xz
spack-a18adf74bf7cd22c88aa0aec2db2cf7ea0904bc4.zip
camp@0.2.3 +rocm: patch for rocm 6 from LLNL/camp PR#143 (#44597)
-rw-r--r--var/spack/repos/builtin/packages/camp/camp-rocm6.patch15
-rw-r--r--var/spack/repos/builtin/packages/camp/package.py2
2 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/camp/camp-rocm6.patch b/var/spack/repos/builtin/packages/camp/camp-rocm6.patch
new file mode 100644
index 0000000000..dbb3fa0220
--- /dev/null
+++ b/var/spack/repos/builtin/packages/camp/camp-rocm6.patch
@@ -0,0 +1,15 @@
+diff -ruN spack-src/include/camp/resource/hip.hpp spack-src-patched/include/camp/resource/hip.hpp
+--- spack-src/include/camp/resource/hip.hpp 2021-08-20 23:38:39.000000000 +0000
++++ spack-src-patched/include/camp/resource/hip.hpp 2024-06-06 21:34:25.174477941 +0000
+@@ -111,7 +111,11 @@
+ hipPointerAttribute_t a;
+ hipError_t status = hipPointerGetAttributes(&a, p);
+ if (status == hipSuccess) {
++#if (HIP_VERSION_MAJOR >= 6)
++ switch (a.type) {
++#else
+ switch (a.memoryType) {
++#endif
+ case hipMemoryTypeHost:
+ return MemoryAccess::Pinned;
+ case hipMemoryTypeDevice:
diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py
index 1bea45b34c..fe91822a9a 100644
--- a/var/spack/repos/builtin/packages/camp/package.py
+++ b/var/spack/repos/builtin/packages/camp/package.py
@@ -54,6 +54,8 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
patch("libstdc++-13-missing-header.patch", when="@:2022.10")
+ patch("camp-rocm6.patch", when="@0.2.3 +rocm ^hip@6:")
+
conflicts("^blt@:0.3.6", when="+rocm")
def cmake_args(self):