From 21822f233ca6d01d796fb517a955e007d143ef3e Mon Sep 17 00:00:00 2001 From: renjithravindrankannath <94420380+renjithravindrankannath@users.noreply.github.com> Date: Mon, 11 Jul 2022 15:01:47 -0700 Subject: Fix for sanity check failure in spack upstream code: atmi, hip-rocclr (#31454) * Fix for sanity check failure in spack upstream code * Style check failure correction * Correction as per the review comments --- var/spack/repos/builtin/packages/atmi/package.py | 5 ++++- var/spack/repos/builtin/packages/hip-rocclr/package.py | 11 +++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/atmi/package.py b/var/spack/repos/builtin/packages/atmi/package.py index b3659dae51..e65d499ca2 100644 --- a/var/spack/repos/builtin/packages/atmi/package.py +++ b/var/spack/repos/builtin/packages/atmi/package.py @@ -55,9 +55,12 @@ class Atmi(CMakePackage): patch('0002-Remove-usr-bin-rsync-reference.patch', when='@4.0.0:') def cmake_args(self): - return [ + args = [ '-DROCM_VERSION={0}'.format(self.spec.version) ] + if self.spec.satisfies('@5.0.2:'): + args.append(self.define('FILE_REORG_BACKWARD_COMPATIBILITY', 'OFF')) + return args @run_after('install') def install_stub(self): diff --git a/var/spack/repos/builtin/packages/hip-rocclr/package.py b/var/spack/repos/builtin/packages/hip-rocclr/package.py index f7b19153f7..9bd068946b 100644 --- a/var/spack/repos/builtin/packages/hip-rocclr/package.py +++ b/var/spack/repos/builtin/packages/hip-rocclr/package.py @@ -107,12 +107,6 @@ class HipRocclr(CMakePackage): when='@master' ) - @property - def install_targets(self): - if self.spec.satisfies('@4.5.0:'): - return [] - return ['install'] - @run_after('install') def deploy_missing_files(self): if '@3.5.0' in self.spec: @@ -135,3 +129,8 @@ class HipRocclr(CMakePackage): '-DOPENCL_DIR={0}/opencl-on-vdi'.format(self.stage.source_path) ] return args + + def __init__(self, spec): + super(HipRocclr, self).__init__(spec) + if self.spec.satisfies('@4.5.0:'): + self.phases = ['cmake', 'build'] -- cgit v1.2.3-60-g2f50