diff options
-rw-r--r-- | var/spack/repos/builtin/packages/legion/hip-offload-arch.patch | 24 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/legion/package.py | 3 |
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/legion/hip-offload-arch.patch b/var/spack/repos/builtin/packages/legion/hip-offload-arch.patch new file mode 100644 index 0000000000..9d716cff18 --- /dev/null +++ b/var/spack/repos/builtin/packages/legion/hip-offload-arch.patch @@ -0,0 +1,24 @@ +diff -ruN spack-src/CMakeLists.txt spack-src-patched/CMakeLists.txt +--- spack-src/CMakeLists.txt 2023-05-18 14:18:00.897162488 -0400 ++++ spack-src-patched/CMakeLists.txt 2023-05-18 14:20:09.532413649 -0400 +@@ -495,7 +495,7 @@ + if("${Legion_HIP_ARCH}" STREQUAL "") + set(HIP_GENCODE "") + else() +- set(HIP_GENCODE "--offload-target=${Legion_HIP_ARCH}") ++ set(HIP_GENCODE "--offload-arch=${Legion_HIP_ARCH}") + endif() + endif() + +diff -ruN spack-src/runtime/runtime.mk spack-src-patched/runtime/runtime.mk +--- spack-src/runtime/runtime.mk 2023-05-18 14:18:00.969164248 -0400 ++++ spack-src-patched/runtime/runtime.mk 2023-05-18 14:20:51.317470176 -0400 +@@ -499,7 +499,7 @@ + HIPCC_FLAGS += -O2 + endif + ifneq ($(strip $(HIP_ARCH)),) +- HIPCC_FLAGS += --offload-target=$(HIP_ARCH) ++ HIPCC_FLAGS += --offload-arch=$(HIP_ARCH) + endif + LEGION_LD_FLAGS += -lm -L$(HIP_PATH)/lib -lamdhip64 + else ifeq ($(strip $(HIP_TARGET)),CUDA) diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index 7bb99e435c..6f422d8e0e 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -70,6 +70,9 @@ class Legion(CMakePackage, ROCmPackage): depends_on("kokkos@3.3.01:~cuda", when="+kokkos~cuda") depends_on("kokkos@3.3.01:~cuda+openmp", when="+kokkos+openmp") + # https://github.com/spack/spack/issues/37232#issuecomment-1553376552 + patch("hip-offload-arch.patch", when="@23.03.0 +rocm") + # HIP specific variant( "hip_hijack", |