rocfft: add spack build test support (#29957)

* rocfft: add spack build test support

* Style cleanup for variant specs
This commit is contained in:
Cory Bloor 2022-05-11 10:37:22 -06:00 committed by GitHub
parent 928ecd1f4e
commit f84991b5a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 4 deletions

View File

@ -0,0 +1,13 @@
diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt
index 6f2bfb8..2354f7b 100644
--- a/clients/tests/CMakeLists.txt
+++ b/clients/tests/CMakeLists.txt
@@ -58,7 +58,7 @@ find_package( FFTW 3.0 REQUIRED MODULE COMPONENTS FLOAT DOUBLE )
set( rocfft-test_include_dirs
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
- $<BUILD_INTERFACE:${FFTW_INCLUDES}>
+ $<BUILD_INTERFACE:${FFTW_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/misc/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../library/src/include>
)

View File

@ -0,0 +1,12 @@
diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt
index 7f14a55..a62fbd4 100644
--- a/clients/CMakeLists.txt
+++ b/clients/CMakeLists.txt
@@ -103,6 +103,7 @@ if( BUILD_CLIENTS_TESTS OR BUILD_CLIENTS_SAMPLES )
# look for installed FFTW if we weren't asked to build it
if( NOT BUILD_FFTW )
find_package( FFTW 3.0 MODULE COMPONENTS FLOAT DOUBLE )
+ set( FFTW_INCLUDES ${FFTW_INCLUDE_DIRS} )
endif()
# also try to build FFTW if FFTW isn't present

View File

@ -42,9 +42,19 @@ class Rocfft(CMakePackage):
variant('amdgpu_target', values=auto_or_any_combination_of(*amdgpu_targets))
variant('amdgpu_target_sram_ecc', values=auto_or_any_combination_of(*amdgpu_targets))
depends_on('cmake@3:', type='build')
depends_on('python@3:', type='build', when='@5.0.0:')
depends_on('sqlite@3.36:', type='build', when='@5.0.0:')
depends_on('cmake@3.16:', type='build', when='@4.5.0:')
depends_on('cmake@3.5:', type='build')
depends_on('python@3.6:', type='build', when='@5.0.0:')
depends_on('sqlite@3.36:', when='@5.0.0:')
depends_on('googletest@1.10.0:', type='test')
depends_on('fftw@3.3.8:', type='test')
depends_on('boost@1.64.0: +program_options', type='test')
depends_on('llvm-amdgpu +openmp', type='test')
def check(self):
exe = join_path(self.build_directory, 'clients', 'staging', 'rocfft-test')
self.run_test(exe, options='--gtest_filter=mix*:adhoc*')
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', '5.0.0',
@ -53,12 +63,16 @@ class Rocfft(CMakePackage):
depends_on('rocm-cmake@%s:' % ver, type='build', when='@' + ver)
patch('0001-Improve-compilation-by-using-sqlite-recipe-for-rocfft.patch', when='@5.0.0:5.0.2')
patch('0002-Fix-clients-fftw3-include-dirs-rocm-4.2.patch', when='@4.2.0:4.3.1')
patch('0003-Fix-clients-fftw3-include-dirs-rocm-4.5.patch', when='@4.5.0:')
def setup_build_environment(self, env):
env.set('CXX', self.spec['hip'].hipcc)
def cmake_args(self):
args = []
args = [
self.define('BUILD_CLIENTS_TESTS', self.run_tests),
]
tgt = self.spec.variants['amdgpu_target']
if 'auto' not in tgt: