summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/rocm-tensile/0003-require-openmp-extras-when-tensile-use-openmp.patch24
-rw-r--r--var/spack/repos/builtin/packages/rocm-tensile/package.py14
2 files changed, 35 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/rocm-tensile/0003-require-openmp-extras-when-tensile-use-openmp.patch b/var/spack/repos/builtin/packages/rocm-tensile/0003-require-openmp-extras-when-tensile-use-openmp.patch
new file mode 100644
index 0000000000..a192b1dfcd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rocm-tensile/0003-require-openmp-extras-when-tensile-use-openmp.patch
@@ -0,0 +1,24 @@
+From 2567ef30dea031fb1b894b74294c82856e47b2a6 Mon Sep 17 00:00:00 2001
+From: Renjith Ravindran <Renjith.RavindranKannath@amd.com>
+Date: Wed, 1 Mar 2023 17:38:17 +0000
+Subject: [PATCH] Include rocm-openmp-extras headers when tensile using openmp
+
+---
+ Tensile/Source/client/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Tensile/Source/client/CMakeLists.txt b/Tensile/Source/client/CMakeLists.txt
+index c04a6b7..7001364 100644
+--- a/Tensile/Source/client/CMakeLists.txt
++++ b/Tensile/Source/client/CMakeLists.txt
+@@ -76,6 +76,7 @@ if(NOT WIN32)
+ endif()
+
+ if(TENSILE_USE_OPENMP)
++ target_include_directories(TensileClient PUBLIC "${ROCM_OPENMP_EXTRAS_DIR}/include")
+ target_link_libraries(TensileClient PRIVATE custom_openmp_cxx)
+ endif()
+
+--
+2.31.1
+
diff --git a/var/spack/repos/builtin/packages/rocm-tensile/package.py b/var/spack/repos/builtin/packages/rocm-tensile/package.py
index 4ef7054a8e..6ab928332c 100644
--- a/var/spack/repos/builtin/packages/rocm-tensile/package.py
+++ b/var/spack/repos/builtin/packages/rocm-tensile/package.py
@@ -157,10 +157,11 @@ class RocmTensile(CMakePackage):
depends_on("rocm-cmake@" + ver, type="build", when="@" + ver)
depends_on("hip@" + ver, when="@" + ver)
depends_on("comgr@" + ver, when="@" + ver)
- depends_on("llvm-amdgpu@" + ver, when="@" + ver + "+openmp")
- depends_on("llvm-amdgpu@" + ver + "~openmp", when="@" + ver + "~openmp")
depends_on("rocminfo@" + ver, type="build", when="@" + ver)
+ for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3", "5.4.0", "5.4.3"]:
+ depends_on("rocm-openmp-extras@" + ver, when="@" + ver)
+
for ver in ["3.5.0", "3.7.0", "3.8.0", "3.9.0"]:
depends_on("rocm-smi@" + ver, type="build", when="@" + ver)
@@ -191,6 +192,7 @@ class RocmTensile(CMakePackage):
# Not yet landed in 3.7.0, nor 3.8.0.
patch("0001-fix-compile-error.patch", when="@3.7.0:3.8.0")
patch("0002-require-openmp-when-tensile-use-openmp-is-on.patch", when="@3.9.0:4.0.0")
+ patch("0003-require-openmp-extras-when-tensile-use-openmp.patch", when="@5.1.0:")
def setup_build_environment(self, env):
env.set("CXX", self.spec["hip"].hipcc)
@@ -215,12 +217,18 @@ class RocmTensile(CMakePackage):
self.define("Tensile_LOGIC", "asm_full"),
self.define("Tensile_CODE_OBJECT_VERSION", "V3"),
self.define("Boost_USE_STATIC_LIBS", "OFF"),
- self.define("TENSILE_USE_OPENMP", "OFF"),
self.define("BUILD_WITH_TENSILE_HOST", "ON" if "@3.7.0:" in self.spec else "OFF"),
]
if "@3.7.0:" in self.spec:
args.append(self.define("Tensile_LIBRARY_FORMAT", "msgpack"))
+ if "@5.1.0:" in self.spec:
+ args.append(self.define("TENSILE_USE_OPENMP", "ON")),
+ args.append(
+ self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
+ ),
+ else:
+ args.append(self.define("TENSILE_USE_OPENMP", "OFF")),
args.append(self.define("Tensile_ARCHITECTURE", self.get_gpulist_for_tensile_support()))