Fix rocblas test build (#41645)
* initial commit to fix rocblas client test * using amdblis for backend
This commit is contained in:
parent
12963529af
commit
cff4f31bd6
@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
|
||||||
|
index 55e9bbe..32b350c 100644
|
||||||
|
--- a/clients/gtest/CMakeLists.txt
|
||||||
|
+++ b/clients/gtest/CMakeLists.txt
|
||||||
|
@@ -164,6 +164,7 @@ target_include_directories( rocblas-test
|
||||||
|
$<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
|
||||||
|
$<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
|
||||||
|
+ $<BUILD_INTERFACE:${ROCM_OPENMP_EXTRAS_DIR}/include>
|
||||||
|
)
|
||||||
|
target_include_directories( rocblas_v3-test
|
||||||
|
SYSTEM PRIVATE
|
||||||
|
@@ -171,6 +172,7 @@ target_include_directories( rocblas_v3-test
|
||||||
|
$<BUILD_INTERFACE:${BLAS_INCLUDE_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${BLIS_INCLUDE_DIR}> # may be blank if not used
|
||||||
|
$<BUILD_INTERFACE:${GTEST_INCLUDE_DIRS}>
|
||||||
|
+ $<BUILD_INTERFACE:${ROCM_OPENMP_EXTRAS_DIR}/include>
|
||||||
|
)
|
||||||
|
|
||||||
|
if( BUILD_FORTRAN_CLIENTS )
|
@ -140,12 +140,10 @@ class Rocblas(CMakePackage):
|
|||||||
depends_on("cmake@3.5:", type="build")
|
depends_on("cmake@3.5:", type="build")
|
||||||
|
|
||||||
depends_on("googletest@1.10.0:", type="test")
|
depends_on("googletest@1.10.0:", type="test")
|
||||||
depends_on("netlib-lapack@3.7.1:", type="test")
|
depends_on("amdblis", type="test")
|
||||||
|
|
||||||
def check(self):
|
for ver in ["5.6.0", "5.6.1", "5.7.0", "5.7.1"]:
|
||||||
if "@4.2.0:" in self.spec:
|
depends_on("rocm-openmp-extras@" + ver, type="test", when="@" + ver)
|
||||||
exe = join_path(self.build_directory, "clients", "staging", "rocblas-test")
|
|
||||||
self.run_test(exe, options=["--gtest_filter=*quick*-*known_bug*"])
|
|
||||||
|
|
||||||
depends_on("hip@4.1.0:", when="@4.1.0:")
|
depends_on("hip@4.1.0:", when="@4.1.0:")
|
||||||
depends_on("llvm-amdgpu@4.1.0:", type="build", when="@4.1.0:")
|
depends_on("llvm-amdgpu@4.1.0:", type="build", when="@4.1.0:")
|
||||||
@ -258,6 +256,7 @@ def check(self):
|
|||||||
# Finding Python package and set command python as python3
|
# Finding Python package and set command python as python3
|
||||||
patch("0004-Find-python.patch", when="@5.2.0:5.4")
|
patch("0004-Find-python.patch", when="@5.2.0:5.4")
|
||||||
patch("0006-Guard-use-of-OpenMP-to-make-it-optional-5.4.patch", when="@5.4")
|
patch("0006-Guard-use-of-OpenMP-to-make-it-optional-5.4.patch", when="@5.4")
|
||||||
|
patch("0007-add-rocm-openmp-extras-include-dir.patch", when="@5.6:")
|
||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
env.set("CXX", self.spec["hip"].hipcc)
|
env.set("CXX", self.spec["hip"].hipcc)
|
||||||
@ -282,7 +281,17 @@ def cmake_args(self):
|
|||||||
self.define_from_variant("BUILD_WITH_TENSILE", "tensile"),
|
self.define_from_variant("BUILD_WITH_TENSILE", "tensile"),
|
||||||
]
|
]
|
||||||
if self.run_tests:
|
if self.run_tests:
|
||||||
args.append(self.define("LINK_BLIS", "OFF"))
|
args.append(self.define("LINK_BLIS", "ON"))
|
||||||
|
if self.spec.satisfies("@5.6.0:"):
|
||||||
|
args.append(
|
||||||
|
self.define("ROCM_OPENMP_EXTRAS_DIR", self.spec["rocm-openmp-extras"].prefix)
|
||||||
|
)
|
||||||
|
args.append(
|
||||||
|
self.define("BLIS_INCLUDE_DIR", self.spec["amdblis"].prefix + "/include/blis/")
|
||||||
|
)
|
||||||
|
args.append(
|
||||||
|
self.define("BLAS_LIBRARY", self.spec["amdblis"].prefix + "/lib/libblis.a")
|
||||||
|
)
|
||||||
|
|
||||||
arch_define_name = "AMDGPU_TARGETS"
|
arch_define_name = "AMDGPU_TARGETS"
|
||||||
if "+tensile" in self.spec:
|
if "+tensile" in self.spec:
|
||||||
@ -321,3 +330,9 @@ def cmake_args(self):
|
|||||||
args.append(self.define("Tensile_CODE_OBJECT_VERSION", "default"))
|
args.append(self.define("Tensile_CODE_OBJECT_VERSION", "default"))
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
@run_after("build")
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
|
def check_build(self):
|
||||||
|
exe = Executable(join_path(self.build_directory, "clients", "staging", "rocblas-test"))
|
||||||
|
exe("--gtest_filter=*quick*-*known_bug*")
|
||||||
|
Loading…
Reference in New Issue
Block a user