summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com>2022-10-24 22:34:04 -0400
committerGitHub <noreply@github.com>2022-10-24 19:34:04 -0700
commit8aa09fd1c0220d2303f2128b51b8a1dd725f3fae (patch)
tree1396256e32c665709942926213fd16f3268a9e84
parent8e78a91ebda4798c0242aec22616cb6b2ba249ae (diff)
downloadspack-8aa09fd1c0220d2303f2128b51b8a1dd725f3fae.tar.gz
spack-8aa09fd1c0220d2303f2128b51b8a1dd725f3fae.tar.bz2
spack-8aa09fd1c0220d2303f2128b51b8a1dd725f3fae.tar.xz
spack-8aa09fd1c0220d2303f2128b51b8a1dd725f3fae.zip
fix problems with missing rocm dependencies (#33381)
-rw-r--r--var/spack/repos/builtin/packages/tasmanian/package.py38
1 files changed, 37 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py
index e2b4ab3973..a37ff06a65 100644
--- a/var/spack/repos/builtin/packages/tasmanian/package.py
+++ b/var/spack/repos/builtin/packages/tasmanian/package.py
@@ -192,7 +192,43 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage):
# using the tests copied from <prefix>/share/Tasmanian/testing
cmake_dir = self.test_suite.current_test_cache_dir.testing
- if not self.run_test(cmake_bin, options=[cmake_dir], purpose="Generate the Makefile"):
+ options = [
+ cmake_dir,
+ ]
+ if "+rocm" in self.spec:
+ options.append(
+ "-DAMDDeviceLibs_DIR="
+ + join_path(self.spec["llvm-amdgpu"].prefix, "lib", "cmake", "AMDDeviceLibs")
+ )
+ options.append(
+ "-Damd_comgr_DIR="
+ + join_path(self.spec["comgr"].prefix, "lib", "cmake", "amd_comgr")
+ )
+ options.append(
+ "-Dhsa-runtime64_DIR="
+ + join_path(self.spec["hsa-rocr-dev"].prefix, "lib", "cmake", "hsa-runtime64")
+ )
+ options.append(
+ "-DHSA_HEADER=" + join_path(self.spec["hsa-rocr-dev"].prefix, "include")
+ )
+ options.append(
+ "-DCMAKE_INCLUDE_PATH="
+ + join_path(self.spec["hsa-rocr-dev"].prefix, "include", "hsa")
+ )
+ options.append(
+ "-Drocblas_DIR="
+ + join_path(self.spec["rocblas"].prefix, "lib", "cmake", "rocblas")
+ )
+ options.append(
+ "-Drocsparse_DIR="
+ + join_path(self.spec["rocsparse"].prefix, "lib", "cmake", "rocsparse")
+ )
+ options.append(
+ "-Drocsolver_DIR="
+ + join_path(self.spec["rocsolver"].prefix, "lib", "cmake", "rocsolver")
+ )
+
+ if not self.run_test(cmake_bin, options=options, purpose="Generate the Makefile"):
tty.msg("Skipping tasmanian test: failed to generate Makefile")
return