diff options
author | Brian Van Essen <vanessen1@llnl.gov> | 2022-06-28 00:45:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 09:45:00 +0200 |
commit | 8965d8f661d34ef38f1d74126660e93585f6bddd (patch) | |
tree | 458b835608fa6f4a0538f36e62f8390d67cbe50e /var | |
parent | 899dfdb4161828bfc43cdbb68d4f1e44e7e6edea (diff) | |
download | spack-8965d8f661d34ef38f1d74126660e93585f6bddd.tar.gz spack-8965d8f661d34ef38f1d74126660e93585f6bddd.tar.bz2 spack-8965d8f661d34ef38f1d74126660e93585f6bddd.tar.xz spack-8965d8f661d34ef38f1d74126660e93585f6bddd.zip |
lbann, aluminum, hydrogen,dihydrogen: explicit flags to pass the AMD GPU architecture into CMake (#31326)
Diffstat (limited to 'var')
4 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/aluminum/package.py b/var/spack/repos/builtin/packages/aluminum/package.py index 8313b876b7..8be4c789f1 100644 --- a/var/spack/repos/builtin/packages/aluminum/package.py +++ b/var/spack/repos/builtin/packages/aluminum/package.py @@ -126,5 +126,10 @@ class Aluminum(CMakePackage, CudaPackage, ROCmPackage): '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' ' -g -fsized-deallocation -fPIC -std=c++17'.format(arch_str) ) + args.extend([ + '-DCMAKE_HIP_ARCHITECTURES=%s' % arch_str, + '-DAMDGPU_TARGETS=%s' % arch_str, + '-DGPU_TARGETS=%s' % arch_str, + ]) return args diff --git a/var/spack/repos/builtin/packages/dihydrogen/package.py b/var/spack/repos/builtin/packages/dihydrogen/package.py index 23a20f8926..e76ca05927 100644 --- a/var/spack/repos/builtin/packages/dihydrogen/package.py +++ b/var/spack/repos/builtin/packages/dihydrogen/package.py @@ -209,6 +209,11 @@ class Dihydrogen(CMakePackage, CudaPackage, ROCmPackage): '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' ' -g -fsized-deallocation -fPIC -std=c++17'.format(arch_str) ) + args.extend([ + '-DCMAKE_HIP_ARCHITECTURES=%s' % arch_str, + '-DAMDGPU_TARGETS=%s' % arch_str, + '-DGPU_TARGETS=%s' % arch_str, + ]) if self.spec.satisfies('^essl'): # IF IBM ESSL is used it needs help finding the proper LAPACK libraries diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index 81915f38fe..f6464c9851 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -201,6 +201,11 @@ class Hydrogen(CMakePackage, CudaPackage, ROCmPackage): ' -g -fsized-deallocation -fPIC {1}' ' -std=c++17'.format(arch_str, cxxflags_str) ) + args.extend([ + '-DCMAKE_HIP_ARCHITECTURES=%s' % arch_str, + '-DAMDGPU_TARGETS=%s' % arch_str, + '-DGPU_TARGETS=%s' % arch_str, + ]) # Add support for OS X to find OpenMP (LLVM installed via brew) if self.spec.satisfies('%clang +openmp platform=darwin'): diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index 95a740bc3b..6c80069802 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -411,6 +411,11 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage): ' -g -fsized-deallocation -fPIC -std=c++17 {1}'.format( arch_str, cxxflags_str) ) + args.extend([ + '-DCMAKE_HIP_ARCHITECTURES=%s' % arch_str, + '-DAMDGPU_TARGETS=%s' % arch_str, + '-DGPU_TARGETS=%s' % arch_str, + ]) # IF IBM ESSL is used it needs help finding the proper LAPACK libraries if self.spec.satisfies('^essl'): |