spfft: fix missing hipFFT dependency with latest ROCm versions (#28880)

This commit is contained in:
Simon Frasch 2022-02-11 22:17:40 +01:00 committed by GitHub
parent 7ec9958b48
commit dc949a5bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,20 +47,23 @@ class Spfft(CMakePackage, CudaPackage):
# ROCM variants + dependencies
variant('rocm', default=False, description="Use ROCm backend")
amdgpu_targets = (
'gfx701', 'gfx801', 'gfx802', 'gfx803',
'gfx900', 'gfx906', 'gfx908', 'gfx1010',
'gfx1011', 'gfx1012'
)
depends_on('rocfft', when='+rocm')
depends_on('hip', when='+rocm')
variant('amdgpu_target', default='gfx803,gfx900,gfx906', multi=True, values=amdgpu_targets, when='+rocm')
depends_on('cuda@:10', when='@:0.9.11 +cuda')
# FindHIP cmake script only works for < 4.1
depends_on('hip@:4.0', when='@:1.0.1 +rocm')
with when('+rocm'):
# FindHIP cmake script only works for < 4.1
depends_on('hip@:4.0', when='@:1.0.1')
depends_on('hip')
depends_on('rocfft')
# rocFFT and hipFFT have split with latest versions
depends_on('hipfft', when='^rocfft@4.1.0:')
amdgpu_targets = (
'gfx701', 'gfx801', 'gfx802', 'gfx803',
'gfx900', 'gfx906', 'gfx908', 'gfx1010',
'gfx1011', 'gfx1012'
)
variant('amdgpu_target', default='gfx803,gfx900,gfx906', multi=True,
values=amdgpu_targets)
# Fix compilation error in some cases due to missing include statement
# before version 1.0.3