From dc949a5bdafc07523ec86815a133e720fc24d09e Mon Sep 17 00:00:00 2001 From: Simon Frasch Date: Fri, 11 Feb 2022 22:17:40 +0100 Subject: spfft: fix missing hipFFT dependency with latest ROCm versions (#28880) --- var/spack/repos/builtin/packages/spfft/package.py | 27 +++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/spfft/package.py b/var/spack/repos/builtin/packages/spfft/package.py index 5c781765e7..e6385b27fd 100644 --- a/var/spack/repos/builtin/packages/spfft/package.py +++ b/var/spack/repos/builtin/packages/spfft/package.py @@ -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 -- cgit v1.2.3-60-g2f50