diff options
13 files changed, 75 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/hipblas/package.py b/var/spack/repos/builtin/packages/hipblas/package.py index c5d77e3fdd..657d37053c 100644 --- a/var/spack/repos/builtin/packages/hipblas/package.py +++ b/var/spack/repos/builtin/packages/hipblas/package.py @@ -42,10 +42,12 @@ class Hipblas(CMakePackage): # installed... if self.spec.satisfies('@:3.9.0'): args.append(self.define('TRY_CUDA', 'OFF')) - else: args.append(self.define('USE_CUDA', 'OFF')) + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + return args def setup_build_environment(self, env): diff --git a/var/spack/repos/builtin/packages/hipcub/package.py b/var/spack/repos/builtin/packages/hipcub/package.py index 8178e3d93f..6c200e84bc 100644 --- a/var/spack/repos/builtin/packages/hipcub/package.py +++ b/var/spack/repos/builtin/packages/hipcub/package.py @@ -39,6 +39,11 @@ class Hipcub(CMakePackage): env.set('CXX', self.spec['hip'].hipcc) def cmake_args(self): - return [ + args = [ self.define('CMAKE_MODULE_PATH', self.spec['hip'].prefix.cmake) ] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + + return args diff --git a/var/spack/repos/builtin/packages/hipfft/package.py b/var/spack/repos/builtin/packages/hipfft/package.py index addb29aec9..3aa47da027 100644 --- a/var/spack/repos/builtin/packages/hipfft/package.py +++ b/var/spack/repos/builtin/packages/hipfft/package.py @@ -36,5 +36,11 @@ class Hipfft(CMakePackage): env.set('CXX', self.spec['hip'].hipcc) def cmake_args(self): - args = ['-DBUILD_CLIENTS_SAMPLES=OFF'] + args = [ + self.define('BUILD_CLIENTS_SAMPLES', 'OFF') + ] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + return args diff --git a/var/spack/repos/builtin/packages/hipfort/package.py b/var/spack/repos/builtin/packages/hipfort/package.py index e5bfc2afc4..a536c557f4 100644 --- a/var/spack/repos/builtin/packages/hipfort/package.py +++ b/var/spack/repos/builtin/packages/hipfort/package.py @@ -32,3 +32,11 @@ class Hipfort(CMakePackage): def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) + + def cmake_args(self): + args = [] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + + return args diff --git a/var/spack/repos/builtin/packages/hipsparse/package.py b/var/spack/repos/builtin/packages/hipsparse/package.py index 341569921b..4f5cb34dbf 100644 --- a/var/spack/repos/builtin/packages/hipsparse/package.py +++ b/var/spack/repos/builtin/packages/hipsparse/package.py @@ -41,11 +41,16 @@ class Hipsparse(CMakePackage): patch('530047af4a0f437dafc02f76b3a17e3b1536c7ec.patch', when='@3.5.0') def cmake_args(self): - return [ + args = [ self.define('CMAKE_CXX_STANDARD', '14'), self.define('BUILD_CLIENTS_SAMPLES', 'OFF'), self.define('BUILD_CLIENTS_TESTS', 'OFF'), ] + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + + return args + def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) diff --git a/var/spack/repos/builtin/packages/rccl/package.py b/var/spack/repos/builtin/packages/rccl/package.py index 2c973cd8ed..2d8c700e4d 100644 --- a/var/spack/repos/builtin/packages/rccl/package.py +++ b/var/spack/repos/builtin/packages/rccl/package.py @@ -50,4 +50,8 @@ class Rccl(CMakePackage): 'NUMACTL_DIR', self.spec['numactl'].prefix )) + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + return args diff --git a/var/spack/repos/builtin/packages/rocalution/package.py b/var/spack/repos/builtin/packages/rocalution/package.py index 2517847d41..d51539a6c5 100644 --- a/var/spack/repos/builtin/packages/rocalution/package.py +++ b/var/spack/repos/builtin/packages/rocalution/package.py @@ -60,8 +60,13 @@ class Rocalution(CMakePackage): filter_file(match, substitute, *files, **kwargs) def cmake_args(self): - return [ + args = [ self.define('SUPPORT_HIP', 'ON'), self.define('SUPPORT_MPI', 'OFF'), self.define('BUILD_CLIENTS_SAMPLES', 'OFF') ] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + + return args diff --git a/var/spack/repos/builtin/packages/rocm-tensile/package.py b/var/spack/repos/builtin/packages/rocm-tensile/package.py index a3dec71ead..bda8b1be38 100644 --- a/var/spack/repos/builtin/packages/rocm-tensile/package.py +++ b/var/spack/repos/builtin/packages/rocm-tensile/package.py @@ -82,6 +82,9 @@ class RocmTensile(CMakePackage): arch = arch + ':xnack-' args.append(self.define('Tensile_ARCHITECTURE', arch)) + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + return args def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/rocprim/package.py b/var/spack/repos/builtin/packages/rocprim/package.py index ba84bdec23..6c36ba055e 100644 --- a/var/spack/repos/builtin/packages/rocprim/package.py +++ b/var/spack/repos/builtin/packages/rocprim/package.py @@ -41,10 +41,15 @@ class Rocprim(CMakePackage): env.set('CXX', self.spec['hip'].hipcc) def cmake_args(self): - return [ + args = [ self.define('CMAKE_MODULE_PATH', self.spec['hip'].prefix.cmake), self.define('ONLY_INSTALL', 'ON'), self.define('BUILD_TEST', 'OFF'), self.define('BUILD_BENCHMARK', 'OFF'), self.define('BUILD_EXAMPLE', 'OFF') ] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + + return args diff --git a/var/spack/repos/builtin/packages/rocrand/package.py b/var/spack/repos/builtin/packages/rocrand/package.py index b150f3dcd3..6ad6a8cc74 100644 --- a/var/spack/repos/builtin/packages/rocrand/package.py +++ b/var/spack/repos/builtin/packages/rocrand/package.py @@ -66,6 +66,12 @@ class Rocrand(CMakePackage): join_path(self.prefix.lib, lib)) def cmake_args(self): - args = ['-DBUILD_BENCHMARK=OFF', - '-DBUILD_TEST=OFF'] + args = [ + self.define('BUILD_BENCHMARK', 'OFF'), + self.define('BUILD_TEST', 'OFF') + ] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + return args diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index d10e9518bf..114eabedef 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -59,6 +59,9 @@ class Rocsolver(CMakePackage): if self.spec.satisfies('@3.7.0:'): args.append(self.define_from_variant('OPTIMAL', 'optimal')) + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + return args def setup_build_environment(self, env): diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py index fc3246984d..cbdde33a69 100644 --- a/var/spack/repos/builtin/packages/rocsparse/package.py +++ b/var/spack/repos/builtin/packages/rocsparse/package.py @@ -38,3 +38,11 @@ class Rocsparse(CMakePackage): def setup_build_environment(self, env): env.set('CXX', self.spec['hip'].hipcc) + + def cmake_args(self): + args = [] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + + return args diff --git a/var/spack/repos/builtin/packages/rocthrust/package.py b/var/spack/repos/builtin/packages/rocthrust/package.py index 41e7d66399..5c49178891 100644 --- a/var/spack/repos/builtin/packages/rocthrust/package.py +++ b/var/spack/repos/builtin/packages/rocthrust/package.py @@ -43,11 +43,14 @@ class Rocthrust(CMakePackage): env.set('CXX', self.spec['hip'].hipcc) def cmake_args(self): - spec = self.spec - - return [ + args = [ self.define( 'CMAKE_MODULE_PATH', - '{0}/cmake'.format(spec['hip'].prefix) + '{0}/cmake'.format(self.spec['hip'].prefix) ) ] + + if self.spec.satisfies('^cmake@3.21:'): + args.append(self.define('__skip_rocmclang', 'ON')) + + return args |