summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/rocm-openmp-extras/package.py62
1 files changed, 45 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py
index c66ea06fd6..865c919900 100644
--- a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py
+++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py
@@ -20,7 +20,9 @@ aomp = [
"aa75455cf1d333419e5310117678e5789c5222f7cb05b05e3dfacef855c55d84",
"9e6ed2c7bdc3b4af069751b5d3e92913fd5ac318ae844f68bd78c5def990a8f7",
"c368d39ba9c1bc8b0edbe66edaa3f2a4ff5649c2bd16f499ac19dfd1591dec5a",
- "c2b1a61a15fdf8d50c7c7a1ad75512f059c53a7bd5afe85f69e984f1174aa74a"
+ "c2b1a61a15fdf8d50c7c7a1ad75512f059c53a7bd5afe85f69e984f1174aa74a",
+ "2092fd210160986127c302c2d636bf5f58ba3a946d27a8474593fa7f87603950",
+ "27a5794b5885c61dc6f63cec36673b37deb029754d3b2fd3e1b21239efffa96a"
]
devlib = [
@@ -29,7 +31,9 @@ devlib = [
"d0aa495f9b63f6d8cf8ac668f4dc61831d996e9ae3f15280052a37b9d7670d2a",
"f5f5aa6bfbd83ff80a968fa332f80220256447c4ccb71c36f1fbd2b4a8e9fc1b",
"34a2ac39b9bb7cfa8175cbab05d30e7f3c06aaffce99eed5f79c616d0f910f5f",
- "055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2"
+ "055a67e63da6491c84cd45865500043553fb33c44d538313dd87040a6f3826f2",
+ "a7291813168e500bfa8aaa5d1dccf5250764ddfe27535def01b51eb5021d4592",
+ "78412fb10ceb215952b5cc722ed08fa82501b5848d599dc00744ae1bdc196f77"
]
llvm = [
@@ -38,7 +42,9 @@ llvm = [
"aa1f80f429fded465e86bcfaef72255da1af1c5c52d58a4c979bc2f6c2da5a69",
"244e38d824fa7dfa8d0edf3c036b3c84e9c17a16791828e4b745a8d31eb374ae",
"751eca1d18595b565cfafa01c3cb43efb9107874865a60c80d6760ba83edb661",
- "1567d349cd3bcd2c217b3ecec2f70abccd5e9248bd2c3c9f21d4cdb44897fc87"
+ "1567d349cd3bcd2c217b3ecec2f70abccd5e9248bd2c3c9f21d4cdb44897fc87",
+ "b53c6b13be7d77dc93a7c62e4adbb414701e4e601e1af2d1e98da4ee07c9837f",
+ "e33d08c8ae42a3ba394dceb8938263cd14ba45e9603b18f3502c3344814ca296"
]
flang = [
@@ -47,7 +53,9 @@ flang = [
"f3e19699ce4ac404f41ffe08ef4546e31e2e741d8deb403b5477659e054275d5",
"f41f661425534b5cfb20e2c0efd9d0800609dc3876ee9c3f76f026d36abbfa35",
"d6c3f3aaa289251a433d99d1cffe432812093089ae876a6863295a15066c1eaf",
- "13d3525078fd1c569f7c8ea7fce439b04f6b03814bbe88600c08f95c788e7802"
+ "13d3525078fd1c569f7c8ea7fce439b04f6b03814bbe88600c08f95c788e7802",
+ "13d3525078fd1c569f7c8ea7fce439b04f6b03814bbe88600c08f95c788e7802",
+ "3d7277fd658e51e7e43272c4b319e733c18f5a6d11f739aaec0df758a720809e"
]
extras = [
@@ -56,10 +64,12 @@ extras = [
"51cc8a7c5943e1d9bc657fc9b9797f45e3ce6a4e544d3d3a967c7cd0185a0510",
"91fdfadb94aa6afc1942124d0953ddc80c297fa75de1897fb42ac8e7dea51ab9",
"31bbe70b51c259a54370d021ae63528a1740b5477a22412685afd14150fff6f4",
- "ec6cc4a9c24f098496de3206714dafe9a714f06afacfe21d53a4e6344f9cb4c9"
+ "ec6cc4a9c24f098496de3206714dafe9a714f06afacfe21d53a4e6344f9cb4c9",
+ "ec6cc4a9c24f098496de3206714dafe9a714f06afacfe21d53a4e6344f9cb4c9",
+ "a9c32fb7659c0aabba5b1e76ec05037dda485bf893cef4144279b42ef8fae416"
]
-versions = ['3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0', '4.3.0']
+versions = ['3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0', '4.3.0', '4.3.1', '4.5.0']
versions_dict = dict()
components = ['aomp', 'devlib', 'llvm', 'flang', 'extras']
component_hashes = [aomp, devlib, llvm, flang, extras]
@@ -75,9 +85,11 @@ class RocmOpenmpExtras(Package):
"""OpenMP support for ROCm LLVM."""
homepage = tools_url + "/aomp"
- url = tools_url + "/aomp/archive/rocm-4.3.0.tar.gz"
+ url = tools_url + "/aomp/archive/rocm-4.5.0.tar.gz"
maintainers = ['srekolam', 'arjun-raj-kuppala', 'estewart08']
+ version('4.5.0', sha256=versions_dict['4.5.0']['aomp'])
+ version('4.3.1', sha256=versions_dict['4.3.1']['aomp'])
version('4.3.0', sha256=versions_dict['4.3.0']['aomp'])
version('4.2.0', sha256=versions_dict['4.2.0']['aomp'])
version('4.1.0', sha256=versions_dict['4.1.0']['aomp'])
@@ -94,7 +106,8 @@ class RocmOpenmpExtras(Package):
depends_on('elfutils', type=('build', 'link'))
depends_on('libffi', type=('build', 'link'))
- for ver in ['3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0', '4.3.0']:
+ for ver in ['3.9.0', '3.10.0', '4.0.0', '4.1.0', '4.2.0', '4.3.0', '4.3.1',
+ '4.5.0']:
depends_on('hsakmt-roct@' + ver, when='@' + ver)
depends_on('comgr@' + ver, when='@' + ver)
depends_on('hsa-rocr-dev@' + ver, when='@' + ver)
@@ -167,9 +180,11 @@ class RocmOpenmpExtras(Package):
llvm_prefix = self.spec['llvm-amdgpu'].prefix
env.set('AOMP', '{0}'.format(llvm_prefix))
env.set('FC', '{0}/bin/flang'.format(openmp_extras_prefix))
- env.set(
- 'GFXLIST',
- 'gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908')
+ gfx_list = "gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908"
+
+ if self.spec.version >= Version('4.3.1'):
+ gfx_list = gfx_list + " gfx90a gfx1030 gfx1031"
+ env.set('GFXLIST', gfx_list)
def patch(self):
src = self.stage.source_path
@@ -178,9 +193,10 @@ class RocmOpenmpExtras(Package):
'{0}/rocm-openmp-extras/llvm-project/openmp/libomptarget'
flang = '{0}/rocm-openmp-extras/flang/'
- # If not in a git repo the STRIP command will have an empty
- # argument. This is fixed in later versions.
- if self.spec.version == Version('4.3.0'):
+ # TODO: Correct condition when fix is present in ROCm release.
+ # Estimated release is ROCm 5.0. If not in a git repo the STRIP
+ # command will have an empty argument.
+ if self.spec.version >= Version('4.3.0'):
filter_file('STRIP ${FLANG_SHA}', 'STRIP 0',
flang.format(src) + 'CMakeLists.txt', string=True)
@@ -192,10 +208,20 @@ class RocmOpenmpExtras(Package):
filter_file(
'{ROCM_DIR}/amdgcn/bitcode', '{DEVICE_LIBS_DIR}',
aomp_extras.format(src) + '/aompextras/CMakeLists.txt',
- aomp_extras.format(src) + '/libm/CMakeLists.txt',
libomptarget.format(src) + '/deviceRTLs/amdgcn/CMakeLists.txt')
+ # Libm moved into llvm-project in 4.5.0
+ if self.spec.version < Version('4.5.0'):
+ filter_file(
+ '{ROCM_DIR}/amdgcn/bitcode', '{DEVICE_LIBS_DIR}',
+ aomp_extras.format(src) + '/libm/CMakeLists.txt')
+
# Openmp adjustments
+ if self.spec.version >= Version('4.5.0'):
+ filter_file(
+ '{ROCM_DIR}/amdgcn/bitcode', '{DEVICE_LIBS_DIR}',
+ libomptarget.format(src) + '/deviceRTLs/libm/CMakeLists.txt')
+
filter_file(
'-nogpulib', '-nogpulib -nogpuinc',
libomptarget.format(src) + '/deviceRTLs/amdgcn/CMakeLists.txt')
@@ -259,7 +285,8 @@ class RocmOpenmpExtras(Package):
def install(self, spec, prefix):
src = self.stage.source_path
- gfx_list = "gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906;gfx908"
+ gfx_list = os.environ['GFXLIST']
+ gfx_list = gfx_list.replace(" ", ";")
openmp_extras_prefix = self.spec['rocm-openmp-extras'].prefix
devlibs_prefix = self.spec['llvm-amdgpu'].prefix
devlibs_src = '{0}/rocm-openmp-extras/rocm-device-libs'.format(src)
@@ -335,7 +362,8 @@ class RocmOpenmpExtras(Package):
'-DLLVM_MAIN_INCLUDE_DIR={0}{1}'.format(src, llvm_inc),
'-DLLVM_INSTALL_PREFIX={0}'.format(llvm_prefix),
'-DCMAKE_C_FLAGS=-isystem{0}'.format(elfutils_inc),
- '-DCMAKE_CXX_FLAGS=-isystem{0}'.format(elfutils_inc)
+ '-DCMAKE_CXX_FLAGS=-isystem{0}'.format(elfutils_inc),
+ '-DNEW_BC_PATH=1'
]
if self.spec.version < Version('4.1.0'):