lbann, aluminum, hydrogen,dihydrogen: explicit flags to pass the AMD GPU architecture into CMake (#31326)

This commit is contained in:
Brian Van Essen 2022-06-28 00:45:00 -07:00 committed by GitHub
parent 899dfdb416
commit 8965d8f661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -126,5 +126,10 @@ def cmake_args(self):
'-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'
' -g -fsized-deallocation -fPIC -std=c++17'.format(arch_str) ' -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 return args

View File

@ -209,6 +209,11 @@ def cmake_args(self):
'-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' '-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'
' -g -fsized-deallocation -fPIC -std=c++17'.format(arch_str) ' -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 self.spec.satisfies('^essl'):
# IF IBM ESSL is used it needs help finding the proper LAPACK libraries # IF IBM ESSL is used it needs help finding the proper LAPACK libraries

View File

@ -201,6 +201,11 @@ def cmake_args(self):
' -g -fsized-deallocation -fPIC {1}' ' -g -fsized-deallocation -fPIC {1}'
' -std=c++17'.format(arch_str, cxxflags_str) ' -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) # Add support for OS X to find OpenMP (LLVM installed via brew)
if self.spec.satisfies('%clang +openmp platform=darwin'): if self.spec.satisfies('%clang +openmp platform=darwin'):

View File

@ -411,6 +411,11 @@ def cmake_args(self):
' -g -fsized-deallocation -fPIC -std=c++17 {1}'.format( ' -g -fsized-deallocation -fPIC -std=c++17 {1}'.format(
arch_str, cxxflags_str) 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 IBM ESSL is used it needs help finding the proper LAPACK libraries
if self.spec.satisfies('^essl'): if self.spec.satisfies('^essl'):