summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCory Bloor <Cordell.Bloor@amd.com>2022-07-05 02:02:46 -0600
committerGitHub <noreply@github.com>2022-07-05 10:02:46 +0200
commita183b343b9a501c2732caf53b59e27768713c0fe (patch)
treec7edde96ffe0f56b71fe4b356c40ccdf0dccd835
parent08fa0c9d46fe1d59e5c223736be2145b14b468fe (diff)
downloadspack-a183b343b9a501c2732caf53b59e27768713c0fe.tar.gz
spack-a183b343b9a501c2732caf53b59e27768713c0fe.tar.bz2
spack-a183b343b9a501c2732caf53b59e27768713c0fe.tar.xz
spack-a183b343b9a501c2732caf53b59e27768713c0fe.zip
rocalution: add spack build test (#31415)
- rocprim is a header-only library; its amdgpu_target variant is only meaningful for its client executables, not the library itself - comgr and llvm-amdgpu are merely indirect dependencies (via hip)
-rw-r--r--var/spack/repos/builtin/packages/rocalution/package.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/rocalution/package.py b/var/spack/repos/builtin/packages/rocalution/package.py
index ec4667246c..850363602c 100644
--- a/var/spack/repos/builtin/packages/rocalution/package.py
+++ b/var/spack/repos/builtin/packages/rocalution/package.py
@@ -53,16 +53,13 @@ class Rocalution(CMakePackage):
'4.2.0', '4.3.0', '4.3.1', '4.5.0', '4.5.2', '5.0.0',
'5.0.2', '5.1.0', '5.1.3']:
depends_on('hip@' + ver, when='@' + ver)
+ depends_on('rocprim@' + ver, when='@' + ver)
for tgt in itertools.chain(['auto'], amdgpu_targets):
rocblas_tgt = tgt if tgt != 'gfx900:xnack-' else 'gfx900'
depends_on('rocblas@{0} amdgpu_target={1}'.format(ver, rocblas_tgt),
when='@{0} amdgpu_target={1}'.format(ver, tgt))
- depends_on('rocprim@{0} amdgpu_target={1}'.format(ver, tgt),
- when='@{0} amdgpu_target={1}'.format(ver, tgt))
depends_on('rocsparse@{0} amdgpu_target={1}'.format(ver, tgt),
when='@{0} amdgpu_target={1}'.format(ver, tgt))
- depends_on('comgr@' + ver, when='@' + ver)
- depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver)
depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver)
for ver in ['3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0',
@@ -72,6 +69,12 @@ class Rocalution(CMakePackage):
depends_on('rocrand@{0} amdgpu_target={1}'.format(ver, tgt),
when='@{0} amdgpu_target={1}'.format(ver, tgt))
+ depends_on('googletest@1.10.0:', type='test')
+
+ def check(self):
+ exe = join_path(self.build_directory, 'clients', 'staging', 'rocalution-test')
+ self.run_test(exe)
+
def setup_build_environment(self, env):
env.set('CXX', self.spec['hip'].hipcc)
@@ -102,7 +105,8 @@ class Rocalution(CMakePackage):
self.define('CMAKE_MODULE_PATH', self.spec['hip'].prefix.cmake),
self.define('SUPPORT_HIP', 'ON'),
self.define('SUPPORT_MPI', 'OFF'),
- self.define('BUILD_CLIENTS_SAMPLES', 'OFF')
+ self.define('BUILD_CLIENTS_SAMPLES', 'OFF'),
+ self.define('BUILD_CLIENTS_TESTS', self.run_tests),
]
if 'auto' not in self.spec.variants['amdgpu_target']: