Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
easyblock = 'CMakeMake'

name = 'glog'
version = '0.7.1'

homepage = 'https://github.com/google/glog'
description = "A C++ implementation of the Google logging module."

toolchain = {'name': 'rocm-compilers', 'version': '22.0.0-ROCm-7.2.0'}
toolchainopts = {'cstd': 'c++14'}

source_urls = ['https://github.com/google/glog/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['00e4a87e87b7e7612f519a41e491f16623b12423620006f59f5688bfd8d13b08']

builddependencies = [
('CMake', '4.0.3'),
]

dependencies = [
('gflags', '2.2.2'),
('libunwind', '1.8.2'),
]

configopts = '-DBUILD_SHARED_LIBS=ON '

sanity_check_paths = {
'files': ['include/glog/logging.h', 'include/glog/raw_logging.h', 'lib/libglog.%s' % SHLIB_EXT],
'dirs': [],
}

moduleclass = 'devel'
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
easyblock = 'Bundle'

name = 'HIP'
_rocm_version = '7.2.0'
version = _rocm_version

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/projects/HIP/']

toolchain = {'name': 'rocm-compilers', 'version': '22.0.0-ROCm-7.2.0'}

builddependencies = [
('binutils', '2.44'),
('CMake', '4.0.3'),
('CppHeaderParser', '2.7.4'),
]

dependencies = [
('OpenGL', '2025.09'),
('rocm-cmake', '0.14.0'),
('numactl', '2.0.19'),
('Perl', '5.40.2'),
('rocprofiler-register', '0.6.0', f'-ROCm-{_rocm_version}'),
('Python', '3.13.5'),
('glog', '0.7.1'),
]

default_easyblock = 'CMakeMake'

components = [
('rocminfo', '1.0.0', {
'sources': [
{
'source_urls': ['https://github.com/ROCm/rocminfo/archive/'],
'download_filename': f'rocm-{_rocm_version}.tar.gz',
'filename': 'rocminfo-%(version)s.tar.gz',
},
],
'checksums': ['99fb0bfb8691edd25d06cb20d5a0c325ef3d485c4cf833a75f50d7141eaf0010'],
'srcdir': 'rocminfo-rocm-%s' % _rocm_version,
'configopts': ' '.join([
"-DCMAKE_EXE_LINKER_FLAGS='-Wl,--disable-new-dtags'",
"-DROCRTST_BLD_TYPE=Release",
"-DROCM_DIR=%(installdir)s",
]),
}),
('HIPCC', '%s' % _rocm_version, {
'sources': [
{
'source_urls': ['https://github.com/ROCm/llvm-project/archive/'],
'download_filename': 'rocm-%s.tar.gz' % _rocm_version,
'filename': 'llvm-project-rocm-%(version)s.tar.gz',
'alt_location': 'ROCm-LLVM',
}
],
'checksums': [
'e86138d2a63fbcbdf64668d55573b26ae944d0f0ae5a3f5bb59bf7bdb3124d3f', # llvm-project-rocm-7.2.0.tar.gz
],
'srcdir': 'llvm-project-rocm-%s/amd/hipcc' % _rocm_version,
}),
('HIP', '%s' % _rocm_version, {
'sources': [
{
'source_urls': ['https://github.com/ROCm/clr/archive/'],
'download_filename': 'rocm-%(version)s.tar.gz',
'filename': 'clr-%(version)s.tar.gz',
},
{
'source_urls': ['https://github.com/ROCm/HIP/archive/'],
'download_filename': 'rocm-%(version)s.tar.gz',
'filename': 'HIP-%(version)s.tar.gz',
},
],
'checksums': [
'fc79e674a5c6da0192437e11d3d41cc593fcc7344194f2d02fa47b965ddd1a5f', # clr-rocm-7.2.0.tar.gz
'4a22fcd0baf8df47d2e234f887f5bc03d522ce78928f82d1b0669a55897c4205', # HIP-rocm-7.2.0.tar.gz
],
'srcdir': 'clr-rocm-%s' % _rocm_version,
'configopts': '-DHIP_COMMON_DIR=%(builddir)s/hip-rocm-%(version)s/ -DHIP_PLATFORM=amd ' +
'-DHIPCC_BIN_DIR=%(installdir)s/bin -DCLR_BUILD_HIP=ON -DCLR_BUILD_OCL=OFF'
}),
]

sanity_check_paths = {
'files': ['bin/%s' % x for x in ['hipcc', 'hipconfig']] +
['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 = [
'hipcc --help',
'hipconfig --full'
]

modextravars = {
'HIP_COMPILER': 'amdclang',
'HIP_INCLUDE_PATH': '%(installdir)s/include',
'HIP_LIB_PATH': '%(installdir)s/lib',
'HIP_PATH': '%(installdir)s',
'HIP_RUNTIME': 'rocclr',
'HIPCC_PATH': '%(installdir)s',
'ROCM_PATH': '%(installdir)s',
}

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'
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
easyblock = 'ROCmComponent'

name = 'rocm-cmake'
version = '0.14.0'
_rocm_version = '7.2.0'

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://rocm.docs.amd.com/projects/ROCmCMakeBuildTools/']

toolchain = {'name': 'rocm-compilers', 'version': '22.0.0-ROCm-7.2.0'}

github_account = 'ROCm'
source_urls = [GITHUB_SOURCE]
sources = [f'rocm-{_rocm_version}.tar.gz']
checksums = ['3f3899e84d78a0fecab62a35eed0014bb503c04d2cf76d263b29daf17f178636']

builddependencies = [
('binutils', '2.44'),
('CMake', '4.0.3'),
]

configopts = ' -DLLVM_INSTALL_PREFIX=$EBROOTROCMMINLLVM'
configopts += ' -DLLVM_DIR=$EBROOTROCMMINLLVM'

sanity_check_paths = {
'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'],
}

moduleclass = 'tools'
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
easyblock = 'Bundle'

name = 'rocm-compilers'
version = '22.0.0'
_rocm_version = '7.2.0'
versionsuffix = f'-ROCm-{_rocm_version}'

homepage = 'https://llvm.org/'
description = """The LLVM Project is a collection of modular and reusable compiler
and toolchain technologies. rocm-compilers represents AMD's fork of the LLVM Project,
including customizations for AMD Radeon and Instinct accelerators."""

toolchain = SYSTEM

local_gcc_version = '14.3.0'
dependencies = [
('GCCcore', local_gcc_version),
('binutils', '2.44', '', ('GCCcore', local_gcc_version)),
('ROCm-LLVM', version, versionsuffix, ('GCCcore', local_gcc_version)),
]

altroot = 'ROCm-LLVM'
altversion = 'ROCm-LLVM'

# this bundle serves as a compiler-only toolchain, so it should be marked as compiler (important for HMNS)
moduleclass = 'compiler'
Loading