Skip to content

Conversation

@Zeldhoron
Copy link

@Zeldhoron Zeldhoron commented Jul 31, 2025

This PR adds easyconfigs to EB for ROCm support.
An overview of everything that's added:

  1. ROCm-LLVM toolchain
  2. various dependencies that were missing
  3. ROCmInfo, AMDSMI, HIP (and ROCm dependencies)
  4. some ROCm dependencies for the ROCm Validation Suite (WIP)

What's left to be added:

  1. rocBLAS (with or without hipBLASLt)
  2. ROCm Validation Suite

This PR builds further upon the following PRs:

@github-actions
Copy link

github-actions bot commented Jul 31, 2025

Updated software amdsmi-25.4.2-GCCcore-13.3.0-ROCm-6.4.1.eb

Diff against amdsmi-25.4.2-GCCcore-14.2.0-ROCm-6.4.1.eb

easybuild/easyconfigs/a/amdsmi/amdsmi-25.4.2-GCCcore-14.2.0-ROCm-6.4.1.eb

diff --git a/easybuild/easyconfigs/a/amdsmi/amdsmi-25.4.2-GCCcore-14.2.0-ROCm-6.4.1.eb b/easybuild/easyconfigs/a/amdsmi/amdsmi-25.4.2-GCCcore-13.3.0-ROCm-6.4.1.eb
index 4ac639e79d..a4bda85cb2 100644
--- a/easybuild/easyconfigs/a/amdsmi/amdsmi-25.4.2-GCCcore-14.2.0-ROCm-6.4.1.eb
+++ b/easybuild/easyconfigs/a/amdsmi/amdsmi-25.4.2-GCCcore-13.3.0-ROCm-6.4.1.eb
@@ -16,7 +16,7 @@ allows applications to control GPU operations, monitor performance, and retrieve
 system's drivers and GPUs."""
 docurls = ['https://rocm.docs.amd.com/projects/amdsmi/en/latest/']
 
-toolchain = {'name': 'GCCcore', 'version': '14.2.0'}
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
 source_urls = [
     'https://github.com/ROCm/amdsmi/archive/refs/tags/',
@@ -28,23 +28,25 @@ sources = [
 ]
 patches = ['amdsmi-25.4.2_handle-non-standard-rocm-paths.patch']
 checksums = [
-    {'rocm-6.4.1.tar.gz': '5e1030cebacf2c92e63a555db6433ce7bb4f91409910ec98947e459d36630401'},
-    {'esmi_pkg_ver-4.1.2.tar.gz': 'd95f12c1500c60dc01b500d8928864a276757bd3bbb4a6daa84fb8c028e2978b'},
+    {'rocm-6.4.1.tar.gz':
+     '5e1030cebacf2c92e63a555db6433ce7bb4f91409910ec98947e459d36630401'},
+    {'esmi_pkg_ver-4.1.2.tar.gz':
+     'd95f12c1500c60dc01b500d8928864a276757bd3bbb4a6daa84fb8c028e2978b'},
     {'amdsmi-25.4.2_handle-non-standard-rocm-paths.patch':
      '97b9067a7702d8131b4c25fba990ebfa538a08de3180c5898271591470ea8d80'},
 ]
 
 builddependencies = [
     ('binutils', '2.42'),
-    ('CMake', '3.31.3'),
-    ('pkgconf', '2.3.0'),
+    ('CMake', '3.29.3'),
+    ('pkgconf', '2.2.0'),
     # Needed as amdsmi tries to find git to determine commit hash it was built from
-    ('git', '2.49.0'),
-    ('libdrm', '2.4.125'),
+    ('git', '2.45.1'),
+    ('libdrm', '2.4.122'),
 ]
 
 dependencies = [
-    ('Python', '3.13.1'),  # Needed as amdsmi is a python script
+    ('Python', '3.12.3'),  # Needed as amdsmi is a python script
 ]
 
 preconfigopts = (f"cp -r %(builddir)s/esmi_ib_library-esmi_pkg_ver-{_esmi_version} "

Updated software Boost-1.85.0-LLVMtc-19.0.0-ROCm-6.4.1.eb

Diff against Boost-1.88.0-GCC-14.3.0.eb

easybuild/easyconfigs/b/Boost/Boost-1.88.0-GCC-14.3.0.eb

diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.88.0-GCC-14.3.0.eb b/easybuild/easyconfigs/b/Boost/Boost-1.85.0-LLVMtc-19.0.0-ROCm-6.4.1.eb
index 976e152d46..bfe1260e1c 100644
--- a/easybuild/easyconfigs/b/Boost/Boost-1.88.0-GCC-14.3.0.eb
+++ b/easybuild/easyconfigs/b/Boost/Boost-1.85.0-LLVMtc-19.0.0-ROCm-6.4.1.eb
@@ -1,22 +1,26 @@
 name = 'Boost'
-version = '1.88.0'
+version = '1.85.0'
 
 homepage = 'https://www.boost.org/'
 description = """Boost provides free peer-reviewed portable C++ source libraries."""
 
-toolchain = {'name': 'GCC', 'version': '14.3.0'}
+toolchain = {'name': 'LLVMtc', 'version': '19.0.0-ROCm-6.4.1'}
 toolchainopts = {'pic': True}
 
 source_urls = ['https://archives.boost.io/release/%(version)s/source/']
 sources = ['%%(namelower)s_%s.tar.gz' % '_'.join(version.split('.'))]
-checksums = ['3621533e820dcab1e8012afd583c0c73cf0f77694952b81352bf38c1488f9cb4']
+patches = ['Boost-1.85.0_fix-ppc-charconv.patch']
+checksums = [
+    'be0d91732d5b0cc6fbb275c7939974457e79b54d6f07ce2e3dfdd68bef883b0b',
+    {'Boost-1.85.0_fix-ppc-charconv.patch': 'bb392cc087fe4951e2c427731020b541c3258ec75f113524303dfb44624f98bc'},
+]
 
 dependencies = [
     ('bzip2', '1.0.8'),
     ('zlib', '1.3.1'),
-    ('XZ', '5.8.1'),
-    ('zstd', '1.5.7'),
-    ('ICU', '77.1'),
+    ('XZ', '5.4.5'),
+    ('zstd', '1.5.6'),
+    ('ICU', '75.1'),
 ]
 
 configopts = '--without-libraries=python,mpi'
Diff against Boost-1.88.0-intel-compilers-2025.1.1.eb

easybuild/easyconfigs/b/Boost/Boost-1.88.0-intel-compilers-2025.1.1.eb

diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.88.0-intel-compilers-2025.1.1.eb b/easybuild/easyconfigs/b/Boost/Boost-1.85.0-LLVMtc-19.0.0-ROCm-6.4.1.eb
index d797c32840..bfe1260e1c 100644
--- a/easybuild/easyconfigs/b/Boost/Boost-1.88.0-intel-compilers-2025.1.1.eb
+++ b/easybuild/easyconfigs/b/Boost/Boost-1.85.0-LLVMtc-19.0.0-ROCm-6.4.1.eb
@@ -1,37 +1,28 @@
 name = 'Boost'
-version = '1.88.0'
+version = '1.85.0'
 
 homepage = 'https://www.boost.org/'
 description = """Boost provides free peer-reviewed portable C++ source libraries."""
 
-toolchain = {'name': 'intel-compilers', 'version': '2025.1.1'}
+toolchain = {'name': 'LLVMtc', 'version': '19.0.0-ROCm-6.4.1'}
 toolchainopts = {'pic': True}
 
 source_urls = ['https://archives.boost.io/release/%(version)s/source/']
 sources = ['%%(namelower)s_%s.tar.gz' % '_'.join(version.split('.'))]
-checksums = ['3621533e820dcab1e8012afd583c0c73cf0f77694952b81352bf38c1488f9cb4']
+patches = ['Boost-1.85.0_fix-ppc-charconv.patch']
+checksums = [
+    'be0d91732d5b0cc6fbb275c7939974457e79b54d6f07ce2e3dfdd68bef883b0b',
+    {'Boost-1.85.0_fix-ppc-charconv.patch': 'bb392cc087fe4951e2c427731020b541c3258ec75f113524303dfb44624f98bc'},
+]
 
 dependencies = [
     ('bzip2', '1.0.8'),
     ('zlib', '1.3.1'),
-    ('XZ', '5.6.3'),
+    ('XZ', '5.4.5'),
     ('zstd', '1.5.6'),
-    ('ICU', '76.1'),
+    ('ICU', '75.1'),
 ]
 
-# add -pthread to icpx compiler tests
-_sed_cmd = "sed -i 's/icpx -x c++ -std=c++11 ;/icpx -x c++ -std=c++11 -pthread ;/g'"
-preconfigopts = f'{_sed_cmd} tools/build/src/engine/build.sh && '
-
-# -ip is not supported with OneAPI compilers
-# instead of -pch-create ... use -Xclang -emit-pch -o ...
-_sed_cmd2 = """sed -i -e 's/-c -pch-create/-c -Xclang -emit-pch -o/g' -e 's/-O3 -ip/-O3/g' -e 's/"ifort"/"ifx"/g'"""
-preconfigopts += f'{_sed_cmd2} tools/build/src/tools/intel-linux.jam && '
-
-# -wdXXX flags are not supported with OneAPI compilers
-_sed_cmd3 = r'''sed -i -E "/<toolset>intel(-linux|):<cxxflags>(\"|'|)-wd[0-9,]/d"'''
-preconfigopts += fr'find . -type f -name "Jamfile.v2" -exec {_sed_cmd3} {{}} \; && '
-
 configopts = '--without-libraries=python,mpi'
 
 # disable MPI, build Boost libraries with tagged layout

Updated software CppHeaderParser-2.7.4-GCCcore-13.3.0.eb

Diff against CppHeaderParser-2.7.4-GCCcore-11.3.0.eb

easybuild/easyconfigs/c/CppHeaderParser/CppHeaderParser-2.7.4-GCCcore-11.3.0.eb

diff --git a/easybuild/easyconfigs/c/CppHeaderParser/CppHeaderParser-2.7.4-GCCcore-11.3.0.eb b/easybuild/easyconfigs/c/CppHeaderParser/CppHeaderParser-2.7.4-GCCcore-13.3.0.eb
index 6bcd0a6b80..8cfe727c62 100644
--- a/easybuild/easyconfigs/c/CppHeaderParser/CppHeaderParser-2.7.4-GCCcore-11.3.0.eb
+++ b/easybuild/easyconfigs/c/CppHeaderParser/CppHeaderParser-2.7.4-GCCcore-13.3.0.eb
@@ -7,11 +7,11 @@ homepage = 'https://senexcanis.com/open-source/cppheaderparser'
 description = """CppHeaderParser is a pure python module that will parse C++
 header files and generate a data structure representing the class."""
 
-toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
 dependencies = [
-    ('binutils', '2.38'),
-    ('Python', '3.10.4'),
+    ('binutils', '2.42'),
+    ('Python', '3.12.3'),
 ]
 
 exts_list = [

Updated software glog-0.7.1-GCCcore-13.3.0.eb

Diff against glog-0.7.1-GCCcore-14.2.0.eb

easybuild/easyconfigs/g/glog/glog-0.7.1-GCCcore-14.2.0.eb

diff --git a/easybuild/easyconfigs/g/glog/glog-0.7.1-GCCcore-14.2.0.eb b/easybuild/easyconfigs/g/glog/glog-0.7.1-GCCcore-13.3.0.eb
index 4e50aae36d..b59788a4f5 100644
--- a/easybuild/easyconfigs/g/glog/glog-0.7.1-GCCcore-14.2.0.eb
+++ b/easybuild/easyconfigs/g/glog/glog-0.7.1-GCCcore-13.3.0.eb
@@ -6,7 +6,7 @@ version = '0.7.1'
 homepage = 'https://github.com/google/glog'
 description = "A C++ implementation of the Google logging module."
 
-toolchain = {'name': 'GCCcore', 'version': '14.2.0'}
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 toolchainopts = {'cstd': 'c++14'}
 
 source_urls = ['https://github.com/google/glog/archive/']
@@ -15,7 +15,7 @@ checksums = ['00e4a87e87b7e7612f519a41e491f16623b12423620006f59f5688bfd8d13b08']
 
 builddependencies = [
     ('binutils', '2.42'),
-    ('CMake', '3.31.3'),
+    ('CMake', '3.29.3'),
 ]
 
 dependencies = [
Diff against glog-0.6.0-GCCcore-11.3.0.eb

easybuild/easyconfigs/g/glog/glog-0.6.0-GCCcore-11.3.0.eb

diff --git a/easybuild/easyconfigs/g/glog/glog-0.6.0-GCCcore-11.3.0.eb b/easybuild/easyconfigs/g/glog/glog-0.7.1-GCCcore-13.3.0.eb
index 3eea2ff72c..b59788a4f5 100644
--- a/easybuild/easyconfigs/g/glog/glog-0.6.0-GCCcore-11.3.0.eb
+++ b/easybuild/easyconfigs/g/glog/glog-0.7.1-GCCcore-13.3.0.eb
@@ -1,26 +1,26 @@
 easyblock = 'CMakeMake'
 
 name = 'glog'
-version = '0.6.0'
+version = '0.7.1'
 
 homepage = 'https://github.com/google/glog'
 description = "A C++ implementation of the Google logging module."
 
-toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
-toolchainopts = {'cstd': 'c++11'}
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
+toolchainopts = {'cstd': 'c++14'}
 
 source_urls = ['https://github.com/google/glog/archive/']
 sources = ['v%(version)s.tar.gz']
-checksums = ['8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6']
+checksums = ['00e4a87e87b7e7612f519a41e491f16623b12423620006f59f5688bfd8d13b08']
 
 builddependencies = [
-    ('binutils', '2.38'),
-    ('CMake', '3.23.1'),
+    ('binutils', '2.42'),
+    ('CMake', '3.29.3'),
 ]
 
 dependencies = [
     ('gflags', '2.2.2'),
-    ('libunwind', '1.6.2'),
+    ('libunwind', '1.8.1'),
 ]
 
 configopts = '-DBUILD_SHARED_LIBS=ON '

Updated software HIP-6.4.43483-LLVMtc-19.0.0-ROCm-6.4.1.eb

Diff against HIP-4.5.0-GCCcore-11.2.0-amd.eb

easybuild/easyconfigs/h/HIP/HIP-4.5.0-GCCcore-11.2.0-amd.eb

diff --git a/easybuild/easyconfigs/h/HIP/HIP-4.5.0-GCCcore-11.2.0-amd.eb b/easybuild/easyconfigs/h/HIP/HIP-6.4.43483-LLVMtc-19.0.0-ROCm-6.4.1.eb
index a68941f8a4..cd99e5875c 100644
--- a/easybuild/easyconfigs/h/HIP/HIP-4.5.0-GCCcore-11.2.0-amd.eb
+++ b/easybuild/easyconfigs/h/HIP/HIP-6.4.43483-LLVMtc-19.0.0-ROCm-6.4.1.eb
@@ -1,88 +1,84 @@
-easyblock = 'CMakeMake'
+easyblock = 'EB_ROCmComponent'
 
 name = 'HIP'
-version = '4.5.0'
-versionsuffix = '-amd'
+version = '6.4.43483'
+_rocm_version = '6.4.1'
 
-homepage = 'https://github.com/ROCm-Developer-Tools/HIP'
+homepage = 'https://github.com/ROCm/HIP'
 description = """HIP is a C++ Runtime API and Kernel Language that allows
 developers to create portable applications for AMD and NVIDIA GPUs from single
 source code."""
-docurls = ['https://rocmdocs.amd.com']
+docurls = ['https://rocmdocs.amd.com/projects/HIP/']
 
-toolchain = {'name': 'GCCcore', 'version': '11.2.0'}
-
-sources = [
-    {
-        'source_urls': ['https://github.com/ROCm-Developer-Tools/hipamd/archive/'],
-        'download_filename': 'rocm-%(version)s.tar.gz',
-        'filename': 'hipamd-rocm-%(version)s.tar.gz',
-    },
-    {
-        'source_urls': ['https://github.com/ROCm-Developer-Tools/ROCclr/archive/'],
-        'download_filename': 'rocm-%(version)s.tar.gz',
-        'filename': 'ROCclr-rocm-%(version)s.tar.gz',
-    },
-    {
-        'source_urls': ['https://github.com/ROCm-Developer-Tools/HIP/archive/'],
-        'download_filename': 'rocm-%(version)s.tar.gz',
-        'filename': 'HIP-rocm-%(version)s.tar.gz',
-    },
-    {
-        'source_urls': ['https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/'],
-        'download_filename': 'rocm-%(version)s.tar.gz',
-        'filename': 'ROCm-OpenCL-Runtime-rocm-%(version)s.tar.gz',
-    },
-]
-
-patches = ['hipamd-rocm-%(version)s-remove-testing.patch']
-
-checksums = [
-    '7b93ab64d6894ff9b5ba0be35e3ed8501d6b18a2a14223d6311d72ab8a9cdba6',  # hipamd-rocm-4.5.0.tar.gz
-    'ca8d6305ff0e620d9cb69ff7ac3898917db9e9b6996a7320244b48ab6511dd8e',  # ROCclr-rocm-4.5.0.tar.gz
-    '4026f31fb4f8050e9aa9d4294f29c3410bfb38422dbbae4236ccd65fed4d55b2',  # HIP-rocm-4.5.0.tar.gz
-    '3a163aed24619b3faf5e8ba17325bdcedd1667a904ea20914ac6bdd33fcdbca8',  # ROCm-OpenCL-Runtime-rocm-4.5.0.tar.gz
-    'bd7651bdb4c38622c7a3ea4fd1be91118917bdf1e1125686c7fc2ecd0ea9db14',  # hipamd-4.5.0-remove-testing.patch
-]
+toolchain = {'name': 'LLVMtc', 'version': '19.0.0-ROCm-6.4.1'}
 
 builddependencies = [
-    ('binutils', '2.37'),
-    ('CMake', '3.21.1'),
+    ('binutils', '2.42'),
+    ('CMake', '3.29.3'),
+    ('CppHeaderParser', '2.7.4'),
 ]
+
 dependencies = [
-    ('Clang-AOMP', '%(version)s'),
-    ('Perl', '5.34.0'),
-    ('ROCR-Runtime', '%(version)s'),
-    ('ROCm-CompilerSupport', '%(version)s'),
-    ('libglvnd', '1.3.3'),
-    ('libxml2', '2.9.10'),
-    ('numactl', '2.0.14'),
-    ('rocm-cmake', '%(version)s'),
-    ('rocminfo', '%(version)s'),
-    ('zlib', '1.2.11'),
+    ('zlib', '1.3.1'),
+    ('libxml2', '2.12.7'),
+    ('numactl', '2.0.18'),
+    ('Perl', '5.38.2'),
+    ('libglvnd', '1.7.0'),
+    ('rocminfo', '1.5.0'),
+    ('rocm-cmake', '0.14.0'),
+    ('rocprofiler-register', '0.5.0'),
 ]
 
-# AMD uses 'gfx' to identify the GPU, the first number identifies the generation, according to
-# https://www.x.org/wiki/RadeonFeature/#index5h2 while the rest identifies the specific GPU.
-# In the context of EasyBuild this identifier can be thought of as equivalent to the 'sm_<xx>'
-# nomenclature of Nvidia.
-local_default_gfx = 'gfx900'
-
-configopts = "-DAMD_OPENCL_PATH=%(builddir)s/ROCm-OpenCL-Runtime-rocm-%(version)s/"
-configopts += " -DHIP_COMMON_DIR=%(builddir)s/HIP-rocm-%(version)s/"
-configopts += " -DHIP_PLATFORM=amd"
-configopts += " -DOFFLOAD_ARCH_STR='%s'" % local_default_gfx
-configopts += " -DROCCLR_PATH=%(builddir)s/ROCclr-rocm-%(version)s/"
+default_easyblock = 'CMakeMake'
 
-postinstallcmds = [
-    'sed -i "s|HIP_CLANG_INCLUDE_PATH = .*|'
-    'HIP_CLANG_INCLUDE_PATH = \\$ENV{\"HIP_CLANG_INCLUDE_PATH\"};|g" %(installdir)s/bin/hipcc',
-    'sed -i "s|ROCM_AGENT_ENUM = .*|ROCM_AGENT_ENUM = \"rocm_agent_enumerator\";|g" %(installdir)s/bin/hipcc',
+components = [
+    ('HIPCC', 'rocm-%s' % _rocm_version, {
+        'sources': [
+            {
+                'source_urls': ['https://github.com/ROCm/llvm-project/archive/'],
+                'download_filename': '%(version)s.tar.gz',
+                'filename': 'llvm-project-%(version)s.tar.gz',
+                'alt_location': 'ROCm-LLVM',
+                'extract_cmd': 'tar xfz %s && mv llvm-project-%(version)s llvm-project-%(version)s.src',
+            },
+        ],
+        'patches': [('HIP-6.4.43483-LLVMtc-19.0.0-ROCm-6.4.1_correct_paths_clang_and_rocm_agent_enum.patch',
+                     'llvm-project-%(version)s.src')],
+        'checksums': [
+            # llvm-project-rocm-6.4.1.tar.gz
+            '460ad28677092b9eb86ffdc49bcb4d01035e32b4f05161d85f90c9fa80239f50',
+            # HIP-6.4.43483-LLVMtc-19.0.0-ROCm-6.4.1_correct_paths_clang_and_rocm_agent_enum.patch
+            'ab58ee1bae0b5c4cec293063758da119dd6c90f944e6821141205dfe1bdbb47e',
+        ],
+        'srcdir': 'llvm-project-%(version)s.src/amd/hipcc',
+    }),
+    ('HIP', 'rocm-%s' % _rocm_version, {
+        'sources': [
+            {
+                'source_urls': ['https://github.com/ROCm/clr/archive/'],
+                'download_filename': '%(version)s.tar.gz',
+                'filename': 'clr-%(version)s.tar.gz',
+            },
+            {
+                'source_urls': ['https://github.com/ROCm/HIP/archive/'],
+                'download_filename': '%(version)s.tar.gz',
+                'filename': 'HIP-%(version)s.tar.gz',
+            },
+        ],
+        'checksums': [
+            '18ee75a04f6fc55e72f8b3fcad1e0d58eceb2ce0e0696ca76d9b3dfaf4bfd7ff', # clr-rocm-6.4.1.tar.gz
+            'f26f098b08504636c6f4e1da45b162f1df2ce6608eba85606fa7932d8fea960f', # HIP-rocm-6.4.1.tar.gz
+        ],
+        'srcdir': 'clr-rocm-%s' % _rocm_version,
+        'configopts': '-DHIP_COMMON_DIR=%(builddir)s/hip-%(version)s/ -DHIP_PLATFORM=amd ' +
+                      '-DHIPCC_BIN_DIR=%(installdir)s/bin -DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=OFF'
+    }),
 ]
 
 sanity_check_paths = {
-    'files': ['bin/hipcc', 'bin/hipconfig', 'include/hip/hip_common.h', 'include/hip/hip_runtime.h',
-              'lib/libamdhip64.%s' % SHLIB_EXT],
+    'files': ['bin/%s' % x for x in ['hipcc', 'hipcc.pl', 'hipconfig', 'hipconfig.pl']] +
+             ['bin/%s' % x for x in ['roc-obj', 'roc-obj-extract', 'roc-obj-ls']] +
+             ['include/hip/hip_common.h', 'include/hip/hip_runtime.h', 'lib/libamdhip64.%s' % SHLIB_EXT],
     'dirs': [],
 }
 sanity_check_commands = [
@@ -97,10 +93,20 @@ modextravars = {
     'HIP_PATH': '%(installdir)s',
     'HIP_RUNTIME': 'rocclr',
     'ROCM_PATH': '%(installdir)s',
-    'DEVICE_LIB_PATH': '$EBROOTCLANGMINAOMP/amdgcn/bitcode',
-    'HIP_CLANG_INCLUDE_PATH': '$EBROOTCLANGMINAOMP/include',
-    'HIP_CLANG_PATH': '$EBROOTCLANGMINAOMP/bin',
-    'HSA_PATH': '$EBROOTROCRMINRUNTIME',
 }
 
+modluafooter = """
+setenv("DEVICE_LIB_PATH", os.getenv("EBROOTROCMMINLLVM") .. "/amdgcn/bitcode")
+setenv("HIP_CLANG_INCLUDE_PATH", os.getenv("EBROOTROCMMINLLVM") .. "/include")
+setenv("HIP_CLANG_PATH", os.getenv("EBROOTROCMMINLLVM") .. "/bin")
+setenv("HSA_PATH", os.getenv("EBROOTROCMMINLLVM"))
+"""
+
+modtclfooter = """
+setenv DEVICE_LIB_PATH $::env(EBROOTROCMMINLLVM)/amdgcn/bitcode
+setenv HIP_CLANG_INCLUDE_PATH $::env(EBROOTROCMMINLLVM)/include
+setenv HIP_CLANG_PATH $::env(EBROOTROCMMINLLVM)/bin
+setenv HSA_PATH $::env(EBROOTROCMMINLLVM)
+"""
+
 moduleclass = 'tools'

Updated software msgpack-cxx-7.0.0-LLVMtc-19.0.0-ROCm-6.4.1.eb

Diff against msgpack-cxx-7.0.0-GCC-14.2.0.eb

easybuild/easyconfigs/m/msgpack-cxx/msgpack-cxx-7.0.0-GCC-14.2.0.eb

diff --git a/easybuild/easyconfigs/m/msgpack-cxx/msgpack-cxx-7.0.0-GCC-14.2.0.eb b/easybuild/easyconfigs/m/msgpack-cxx/msgpack-cxx-7.0.0-LLVMtc-19.0.0-ROCm-6.4.1.eb
index 09234d52ae..6c003aa571 100644
--- a/easybuild/easyconfigs/m/msgpack-cxx/msgpack-cxx-7.0.0-GCC-14.2.0.eb
+++ b/easybuild/easyconfigs/m/msgpack-cxx/msgpack-cxx-7.0.0-LLVMtc-19.0.0-ROCm-6.4.1.eb
@@ -1,4 +1,3 @@
-# Thomas Hoffmann, EMBL Heidelberg, [email protected], 2021/04
 easyblock = 'CMakeMake'
 
 name = 'msgpack-cxx'
@@ -10,7 +9,7 @@ data among multiple languages like JSON, except that it's faster and smaller.
 Small integers are encoded into a single byte while typical short strings
 require only one extra byte in addition to the strings themselves."""
 
-toolchain = {'name': 'GCC', 'version': '14.2.0'}
+toolchain = {'name': 'LLVMtc', 'version': '19.0.0-ROCm-6.4.1'}
 
 source_urls = ['https://github.com/msgpack/msgpack-c/releases/download/cpp-%(version)s']
 sources = ['msgpack-cxx-%(version)s.tar.gz']
@@ -18,18 +17,18 @@ checksums = ['7504b7af7e7b9002ce529d4f941e1b7fb1fb435768780ce7da4abaac79bb156f']
 
 builddependencies = [
     ('binutils', '2.42'),
-    ('CMake', '3.31.3'),
-    ('googletest', '1.17.0'),
+    ('CMake', '3.29.3'),
+    ('googletest', '1.15.2'),
 ]
 
 dependencies = [
-    ('Boost', '1.88.0')
+    ('Boost', '1.85.0')
 ]
 
 sanity_check_paths = {
     'files': [
-        'lib/cmake/msgpack-cxx/msgpack-cxx-config.cmake',
-        'include/msgpack.hpp',
+        ['lib/cmake/msgpack-cxx/msgpack-cxx-config.cmake'],
+        ['include/msgpack.hpp']
     ],
     'dirs': ['include/msgpack'],
 }

Updated software OpenSSL-1.1.1-GCCcore-13.3.0.eb

Diff against OpenSSL-3.eb

easybuild/easyconfigs/o/OpenSSL/OpenSSL-3.eb

diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-3.eb b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.1-GCCcore-13.3.0.eb
index 4a08899c75..c2a6003b87 100644
--- a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-3.eb
+++ b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.1-GCCcore-13.3.0.eb
@@ -1,39 +1,23 @@
-easyblock = 'EB_OpenSSL_wrapper'
-
 name = 'OpenSSL'
-version = '3'
-minimum_openssl_version = '3.0.0'
+version = '1.1.1'
 
 homepage = 'https://www.openssl.org/'
 description = """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured,
  and Open Source toolchain implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
  protocols as well as a full-strength general purpose cryptography library. """
 
-toolchain = SYSTEM
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
+toolchainopts = {'pic': True}
 
-builddependencies = [
-    ('pkgconf', '1.8.0'),
-    ('Perl', '5.38.0'),
-]
+source_urls = ['https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1/']
+sources = [SOURCELOWER_TAR_GZ]
+checksums = ['2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d']
 
-# This easyconfig will wrap the OpenSSL installation in the host system.
-# If the system provides the required binary, header files, and libraries for
-# this version of OpenSSL, the installation directory of this module will be
-# populated with symlinks to the system files. The minimum required version of
-# OpenSSL can be finely controled with 'minimum_openssl_version' (defaults to
-# easyconfig version).
-# If the host system does not have this version of OpenSSL (or with the option
-# wrap_system_openssl = False), EasyBuild will fall back to the following
-# component list, which will be build and installed as usual.
+dependencies = [('zlib', '1.3.1')]
 
-components = [
-    (name, '3.2.1', {
-        'easyblock': 'EB_OpenSSL',
-        'source_urls': ['https://www.openssl.org/source/'],
-        'sources': [SOURCELOWER_TAR_GZ],
-        'checksums': ['83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39'],
-        'start_dir': '%(namelower)s-%(version)s',
-    }),
+builddependencies = [
+    ('Perl', '5.38.2'),
+    ('binutils', '2.42'),
 ]
 
 moduleclass = 'system'
Diff against OpenSSL-1.1.1q-GCCcore-10.3.0.eb

easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.1q-GCCcore-10.3.0.eb

diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.1q-GCCcore-10.3.0.eb b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.1-GCCcore-13.3.0.eb
index 1aedc1e69d..c2a6003b87 100644
--- a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.1q-GCCcore-10.3.0.eb
+++ b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.1-GCCcore-13.3.0.eb
@@ -1,25 +1,23 @@
 name = 'OpenSSL'
-version = '1.1.1q'
+version = '1.1.1'
 
 homepage = 'https://www.openssl.org/'
 description = """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured,
  and Open Source toolchain implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
  protocols as well as a full-strength general purpose cryptography library. """
 
-toolchain = {'name': 'GCCcore', 'version': '10.3.0'}
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 toolchainopts = {'pic': True}
 
-source_urls = ['https://www.openssl.org/source/']
+source_urls = ['https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1/']
 sources = [SOURCELOWER_TAR_GZ]
-checksums = ['d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca']
+checksums = ['2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d']
 
-dependencies = [('zlib', '1.2.11')]
+dependencies = [('zlib', '1.3.1')]
 
 builddependencies = [
-    ('Perl', '5.32.1', '-minimal'),
-    ('binutils', '2.36.1'),
+    ('Perl', '5.38.2'),
+    ('binutils', '2.42'),
 ]
 
-runtest = 'test'
-
 moduleclass = 'system'

Updated software rocm-cmake-0.14.0-GCCcore-13.3.0-ROCm-6.4.1.eb

Diff against rocm-cmake-4.5.0-GCCcore-11.2.0.eb

easybuild/easyconfigs/r/rocm-cmake/rocm-cmake-4.5.0-GCCcore-11.2.0.eb

diff --git a/easybuild/easyconfigs/r/rocm-cmake/rocm-cmake-4.5.0-GCCcore-11.2.0.eb b/easybuild/easyconfigs/r/rocm-cmake/rocm-cmake-0.14.0-GCCcore-13.3.0-ROCm-6.4.1.eb
index cd8f5cea65..ae2ebe307a 100644
--- a/easybuild/easyconfigs/r/rocm-cmake/rocm-cmake-4.5.0-GCCcore-11.2.0.eb
+++ b/easybuild/easyconfigs/r/rocm-cmake/rocm-cmake-0.14.0-GCCcore-13.3.0-ROCm-6.4.1.eb
@@ -1,36 +1,33 @@
 easyblock = 'CMakeMake'
 
 name = 'rocm-cmake'
-version = '4.5.0'
+version = '0.14.0'
+_rocm_version = '6.4.1'
+version_suffix = f'-ROCm-{_rocm_version}'
 
-homepage = 'https://github.com/RadeonOpenCompute/rocm-cmake'
+homepage = 'https://github.com/ROCm/rocm-cmake'
 description = """ROCM cmake modules provides cmake modules for common build
 tasks needed for the ROCM software stack"""
-docurls = ['https://rocmdocs.amd.com']
+docurls = ['https://rocm.docs.amd.com/projects/ROCmCMakeBuildTools/']
 
-toolchain = {'name': 'GCCcore', 'version': '11.2.0'}
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-source_urls = ["https://github.com/RadeonOpenCompute/rocm-cmake/archive/refs/tags/"]
-sources = ["rocm-%(version)s.tar.gz"]
-checksums = ['c77b71454010adbeea5357773aa98dd0725f655f51a411815807cabf29258395']
+github_account = 'ROCm'
+source_urls = [GITHUB_SOURCE]
+sources = [f'rocm-{_rocm_version}.tar.gz']
+checksums = ['d6dfa862009d593f4d334e0c6da9ac52b228e52bb3b38b53405975f28087ca2f']
 
 builddependencies = [
-    ('binutils', '2.37'),
-    ('CMake', '3.21.1'),
+    ('binutils', '2.42'),
+    ('CMake', '3.29.3'),
 ]
-dependencies = [
-    ('Clang-AOMP', '%(version)s'),
-]
-
-configopts = '-DCMAKE_C_COMPILER=$EBROOTCLANGMINAOMP/bin/clang'
-configopts += ' -DCMAKE_CXX_COMPILER=$EBROOTCLANGMINAOMP/bin/clang++'
-configopts += ' -DLLVM_INSTALL_PREFIX=$EBROOTCLANGMINAOMP'
-configopts += ' -DLLVM_DIR=$EBROOTCLANGMINAOMP'
 
 sanity_check_paths = {
-    'files': ['share/rocm/cmake/ROCMChecks.cmake', 'share/rocm/cmake/ROCMConfig.cmake',
-              'share/rocm/cmake/ROCMCppCheck.cmake', 'share/rocm/cmake/ROCMCreatePackage.cmake',
-              'share/rocm/cmake/ROCMSetupVersion.cmake'],
+    'files': ['share/rocm/cmake/ROCMConfig.cmake', 'share/rocm/cmake/ROCMConfigVersion.cmake',
+              'share/rocmcmakebuildtools/cmake/ROCMChecks.cmake',
+              'share/rocmcmakebuildtools/cmake/ROCMCppCheck.cmake',
+              'share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake',
+              'share/rocmcmakebuildtools/cmake/ROCMSetupVersion.cmake'],
     'dirs': ['share/rocm/cmake'],
 }
 

Updated software rocminfo-1.5.0-GCCcore-13.3.0-ROCm-6.4.1.eb

Diff against rocminfo-4.5.0-GCCcore-11.2.0.eb

easybuild/easyconfigs/r/rocminfo/rocminfo-4.5.0-GCCcore-11.2.0.eb

diff --git a/easybuild/easyconfigs/r/rocminfo/rocminfo-4.5.0-GCCcore-11.2.0.eb b/easybuild/easyconfigs/r/rocminfo/rocminfo-1.5.0-GCCcore-13.3.0-ROCm-6.4.1.eb
index 7c01c982fd..88d36f8376 100644
--- a/easybuild/easyconfigs/r/rocminfo/rocminfo-4.5.0-GCCcore-11.2.0.eb
+++ b/easybuild/easyconfigs/r/rocminfo/rocminfo-1.5.0-GCCcore-13.3.0-ROCm-6.4.1.eb
@@ -1,25 +1,27 @@
 easyblock = 'CMakeMake'
 
 name = 'rocminfo'
-version = '4.5.0'
+version = '1.5.0'
+_rocm_version = '6.4.1'
+version_suffix = f'-ROCm-{_rocm_version}'
 
 homepage = 'https://github.com/RadeonOpenCompute/rocminfo'
 description = """ROCm Application for Reporting System Info"""
-docurls = ['https://rocmdocs.amd.com']
+docurls = ['https://rocm.docs.amd.com/projects/rocminfo/']
 
-toolchain = {'name': 'GCCcore', 'version': '11.2.0'}
+toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
 
-source_urls = ["https://github.com/RadeonOpenCompute/rocminfo/archive/refs/tags/"]
-sources = ["rocm-%(version)s.tar.gz"]
-checksums = ['421ed55192780eb478f0341fd1ce47a0dd3ffafbec9d7a02109a411878a58ee5']
+github_account = 'ROCm'
+source_urls = [GITHUB_SOURCE]
+sources = [f'rocm-{_rocm_version}.tar.gz']
+checksums = ['eabbe4bfb29152900bbde812c6fffd5555b45842259242d85f29e449c00f3249']
 
 builddependencies = [
-    ('binutils', '2.37'),
-    ('CMake', '3.21.1'),
+    ('binutils', '2.42'),
+    ('CMake', '3.29.3'),
 ]
 dependencies = [
-    ('ROCR-Runtime', '%(version)s'),
-    ('Python', '3.9.6'),  # Needed for 'rocm_agent_enumerator' which is a Python script
+    ('Python', '3.12.3'),
 ]
 
 configopts = "-DCMAKE_EXE_LINKER_FLAGS='-Wl,--disable-new-dtags'"

@Thyre
Copy link
Collaborator

Thyre commented Jul 31, 2025

There seem to be a few things missing still (like rocRAND), right?
A additional things...

'dirs': [],
}
sanity_check_commands = [
'rocminfo --help',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--help does not exist, and the check will likely fail if no GPU is present (to be verified).

@Thyre
Copy link
Collaborator

Thyre commented Jul 31, 2025

Generally, I think trying to sync the integration would make sense as well.
I have #23304 open as a first step to add ROCm-LLVM to 2025a as well, and we should try to have a consistent style at least if we add this to two toolchains.

I might try to update my ECs to ROCm 6.4.2 (or add them to 14.3.0 to make them available on our AMD nodes), but don't know when I find the time for that.

@Thyre
Copy link
Collaborator

Thyre commented Jul 31, 2025

You'll need to port the patch for ROCm-LLVM from #23304 as well, or else building will fail after the merge of easybuilders/easybuild-easyblocks#3799. This fixes both the build failure and another issue when using the installation later on, e.g. for OpenMP offload.

monitor performance, and retrieve information about the system's drivers and GPUs."""
docurls = ['https://rocmdocs.amd.com/projects/amdsmi/']

toolchain = {'name': 'LLVMtc', 'version': 'ROCm-6.4.1'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toolchain = {'name': 'LLVMtc', 'version': 'ROCm-6.4.1'}
toolchain = {'name': 'GCCcore', 'version': '13.3.0'}

There should be nothing that requires building amdsmi with ROCm-LLVM, see

https://github.com/easybuilders/easybuild-easyconfigs/blob/856e35188b9ec014cc8f95e13044e14e5d7463f9/easybuild/easyconfigs/a/amdsmi/amdsmi-25.4.2-GCCcore-14.2.0-ROCm-6.4.1.eb

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note the esmi components, which are required (building may fail otherwise) and should not be pulled in during the build. We can provide them ourselves.

@Thyre
Copy link
Collaborator

Thyre commented Jul 31, 2025

I feel like all components should use the actual version instead of simply specifying 6.4.1, i.e. the ROCm version.
Each component has an actual version, and this could potentially allow us to provide a second version of something if there's a known issue being fixed later on.

We might need to figure out if all components provide a tarball / tag for "their" releases as well or only for ROCm releases though.

@Thyre
Copy link
Collaborator

Thyre commented Jul 31, 2025

Short discussion results from the EESSI slack with @Zeldhoron:

@Thyre Thyre added the 2024a issues & PRs related to 2024a common toolchains label Aug 1, 2025
easyblock = 'Bundle'

name = 'LLVMtc'
version = 'ROCm-6.4.1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering how does interact with the logic in the toolchain to filter out flags that are not supported by flang
https://github.com/easybuilders/easybuild-framework/blob/7b14ab77662dbead8f4eb0e08d925373ed6135db/easybuild/toolchains/compiler/llvm.py#L59-L66
https://github.com/easybuilders/easybuild-framework/blob/bb62f27df2d3873480b1afe1eba81d7c00db101a/easybuild/toolchains/compiler/llvm.py#L162-L181

We should check that this does not cause LooseVersion to Fail and possibly implement some way to keep the version of LLVM to know what to filter (or add a list of filters for ROCm versions)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first check is basically for flags which are not understood until LLVM 21? If so, then we probably have to wait for a first ROCm version based on LLVM 21.

We could also have a ROCmtc, based on LLVMtc. That's yet another toolchain, but would make handling such versioning things easier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put 21 there as it was not out yet when made the toolchain but have to test if the flang in 21 actually supports those flags or not

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first check is basically for flags which are not understood until LLVM 21? If so, then we probably have to wait for a first ROCm version based on LLVM 21.

Not necessarily those checks are to allow general flags to be passed to bot clang and flang but than filter them out if flang does not supported them.
The other way would be to split the flags from generic into C and F _OPTIONS but it would still require some level of version control

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe the better approach is to use the LLVM version as the version and then suffix it with ROCm-<rocm_version>, that way we can reuse the logic to check allowed options

@boegel boegel changed the title Add easyconfigs for ROCm using ROCm-LLVM toolchain Add easyconfigs for ROCm 6.4.1 using ROCm-LLVM toolchain Aug 7, 2025
@Zeldhoron
Copy link
Author

I've finished updating everything to match the results of the discussion we had. I didn't have the time to test all the changes I made, but there shouldn't be any major difficulties. There are still a couple of easyconfigs that need to be added (hipBLASLt, rocBLAS, ValidationSuite), but they are currently blocked on the hipBLASLt issue ROCm/rocm-libraries#316. A previous version of these easyconfigs (including the ones that still need to be added) can be found at https://github.com/Zeldhoron/easyconfig-rocm/tree/master/easyconfigs.

@boegel
Copy link
Member

boegel commented Sep 8, 2025

The problem with excessive memory usage is also being looked at by Gentoo, see https://bugs.gentoo.org/960513

In a recent commit made in the context of that issue, they introduced using -DTensile_CPU_THREADS to control how many cores are being used, which could perhaps resolve the issue?

@Thyre
Copy link
Collaborator

Thyre commented Sep 8, 2025

The problem with excessive memory usage is also being looked at by Gentoo, see https://bugs.gentoo.org/960513

In a recent commit made in the context of that issue, they introduced using -DTensile_CPU_THREADS to control how many cores are being used, which could perhaps resolve the issue?

If I remember correctly, @Zeldhoron was already using this variable, as I also have been doing for hipBLASLt. It just looks like that some GPU targets consume excessive amounts of memory compared to others. Building for gfx1201 with 32GB of system memory went smooth for me with this as the only target, as did building for gfx90a on our MI250X node, though we had 512GB (or 256GB?) of system memory there.

I've not tried building for other targets so far. That will probably come once we're a bit further with the ROCm stack, as I don't want to open draft PRs for all components until we've at least the ROCm LLVM itself merged...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2024a issues & PRs related to 2024a common toolchains new update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants