rocblas: add spack test support (#27436)
* rocblas: add spack test support * rocblas: limit spack test support to @4.2.0: * rocblas: simplify define
This commit is contained in:
parent
10f3113b3c
commit
2bd016895d
3 changed files with 52 additions and 7 deletions
|
@ -0,0 +1,24 @@
|
|||
diff -r -u a/clients/benchmarks/CMakeLists.txt b/clients/benchmarks/CMakeLists.txt
|
||||
--- a/clients/benchmarks/CMakeLists.txt 2021-11-12 12:22:24.359556397 -0700
|
||||
+++ b/clients/benchmarks/CMakeLists.txt 2021-11-12 14:21:31.246604351 -0700
|
||||
@@ -52,6 +52,8 @@
|
||||
target_link_libraries( rocblas-bench PRIVATE rocblas_fortran_client roc::rocblas lapack cblas )
|
||||
if(LINK_BLIS)
|
||||
target_link_libraries( rocblas-bench PRIVATE ${BLIS_LIBRARY} )
|
||||
+else()
|
||||
+ target_link_libraries( rocblas-bench PRIVATE blas )
|
||||
endif()
|
||||
|
||||
if( CUDA_FOUND )
|
||||
diff -r -u a/clients/gtest/CMakeLists.txt b/clients/gtest/CMakeLists.txt
|
||||
--- a/clients/gtest/CMakeLists.txt 2021-11-12 12:22:24.359556397 -0700
|
||||
+++ b/clients/gtest/CMakeLists.txt 2021-11-12 14:20:59.057676192 -0700
|
||||
@@ -132,6 +132,8 @@
|
||||
target_link_libraries( rocblas-test PRIVATE rocblas_fortran_client roc::rocblas lapack cblas ${GTEST_LIBRARIES} )
|
||||
if(LINK_BLIS)
|
||||
target_link_libraries( rocblas-test PRIVATE ${BLIS_LIBRARY} )
|
||||
+else()
|
||||
+ target_link_libraries( rocblas-test PRIVATE blas )
|
||||
endif()
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
diff -r -u a/clients/common/rocblas_gentest.py b/clients/common/rocblas_gentest.py
|
||||
--- a/clients/common/rocblas_gentest.py 2021-11-12 12:22:24.359556397 -0700
|
||||
+++ b/clients/common/rocblas_gentest.py 2021-11-12 12:22:41.464044040 -0700
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python3
|
||||
+#!/usr/bin/env python3
|
||||
"""Copyright 2018-2020 Advanced Micro Devices, Inc.
|
||||
Expand rocBLAS YAML test data file into binary Arguments records"""
|
||||
|
|
@ -51,7 +51,17 @@ class Rocblas(CMakePackage):
|
|||
conflicts('tensile_architecture=gfx1012', when='@:4.2.1')
|
||||
conflicts('tensile_architecture=gfx1030', when='@:4.2.1')
|
||||
|
||||
depends_on('cmake@3:', type='build')
|
||||
depends_on('cmake@3.16.8:', type='build', when='@4.2.0:')
|
||||
depends_on('cmake@3.8:', type='build', when='@3.9.0:')
|
||||
depends_on('cmake@3.5:', type='build')
|
||||
|
||||
depends_on('googletest@1.10.0:', type='test')
|
||||
depends_on('netlib-lapack@3.7.1:', type='test')
|
||||
|
||||
def check(self):
|
||||
if '@4.2.0:' in self.spec:
|
||||
exe = join_path(self.build_directory, 'clients', 'staging', 'rocblas-test')
|
||||
self.run_test(exe, options=['--gtest_filter=*quick*-*known_bug*'])
|
||||
|
||||
for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0',
|
||||
'4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2']:
|
||||
|
@ -69,7 +79,7 @@ class Rocblas(CMakePackage):
|
|||
# This is the default library format since 3.7.0
|
||||
depends_on('msgpack-c@3:', when='@3.7:')
|
||||
|
||||
depends_on('python', type='build')
|
||||
depends_on('python@3.6:', type='build')
|
||||
depends_on('py-virtualenv', type='build')
|
||||
depends_on('perl-file-which', type='build')
|
||||
depends_on('py-pyyaml', type='build')
|
||||
|
@ -99,6 +109,8 @@ class Rocblas(CMakePackage):
|
|||
# Status: https://github.com/ROCmSoftwarePlatform/Tensile/commit/a488f7dadba34f84b9658ba92ce9ec5a0615a087
|
||||
# Not yet landed in 3.7.0, nor 3.8.0.
|
||||
patch('0001-Fix-compilation-error-with-StringRef-to-basic-string.patch', when='@:3.8')
|
||||
patch('0002-Fix-rocblas-clients-blas.patch', when='@4.2.0:4.3.1')
|
||||
patch('0003-Fix-rocblas-gentest.patch', when='@4.2.0:')
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set('CXX', self.spec['hip'].hipcc)
|
||||
|
@ -117,7 +129,8 @@ def get_gpulist_for_tensile_support(self):
|
|||
def cmake_args(self):
|
||||
tensile = join_path(self.stage.source_path, 'Tensile')
|
||||
args = [
|
||||
self.define('BUILD_CLIENTS_TESTS', 'OFF'),
|
||||
self.define('BUILD_CLIENTS_TESTS',
|
||||
self.run_tests and '@4.2.0:' in self.spec),
|
||||
self.define('BUILD_CLIENTS_BENCHMARKS', 'OFF'),
|
||||
self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
|
||||
self.define('RUN_HEADER_TESTING', 'OFF'),
|
||||
|
@ -126,11 +139,10 @@ def cmake_args(self):
|
|||
self.define('Tensile_COMPILER', 'hipcc'),
|
||||
self.define('Tensile_LOGIC', 'asm_full'),
|
||||
self.define('Tensile_CODE_OBJECT_VERSION', 'V3'),
|
||||
self.define(
|
||||
'BUILD_WITH_TENSILE_HOST',
|
||||
'ON' if '@3.7.0:' in self.spec else 'OFF'
|
||||
)
|
||||
self.define('BUILD_WITH_TENSILE_HOST', '@3.7.0:' in self.spec)
|
||||
]
|
||||
if self.run_tests:
|
||||
args.append(self.define('LINK_BLIS', 'OFF'))
|
||||
|
||||
if '@3.7.0:' in self.spec:
|
||||
args.append(self.define('Tensile_LIBRARY_FORMAT', 'msgpack'))
|
||||
|
|
Loading…
Reference in a new issue