From 2e8b59dbdf662565d29b13f61a86b38c8364fa09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Fri, 23 Jan 2026 15:44:53 +0100 Subject: [PATCH 1/6] Add ROCm toolchain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan André Reuter --- .../toolchains/compiler/rocm_compilers.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 easybuild/toolchains/compiler/rocm_compilers.py diff --git a/easybuild/toolchains/compiler/rocm_compilers.py b/easybuild/toolchains/compiler/rocm_compilers.py new file mode 100644 index 0000000000..58ffb0de49 --- /dev/null +++ b/easybuild/toolchains/compiler/rocm_compilers.py @@ -0,0 +1,52 @@ +## +# Copyright 2013-2025 Ghent University +# +# This file is triple-licensed under GPLv2 (see below), MIT, and +# BSD three-clause licenses. +# +# This file is part of EasyBuild, +# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), +# with support of Ghent University (http://ugent.be/hpc), +# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), +# Flemish Research Foundation (FWO) (http://www.fwo.be/en) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# https://github.com/easybuilders/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for Clang + Flang compiler toolchain. + +Authors: + +* Jan Reuter (jan@zyten.de) +""" + +from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME +from easybuild.tools.toolchain.compiler import LLVMCompilers + +TC_CONSTANT_LLVM = "ROCm" + + +class ROCmCompilers(LLVMCompilers): + """Compiler toolchain with ROCm compilers (amdclang/amdflang).""" + COMPILER_FAMILY = TC_CONSTANT_LLVM + SUBTOOLCHAIN = SYSTEM_TOOLCHAIN_NAME + + COMPILER_CC = 'amdclang' + COMPILER_CXX = 'amdclang++' + + COMPILER_F77 = 'amdflang' + COMPILER_F90 = 'amdflang' + COMPILER_FC = 'amdflang' From 44a5a0d2b1e3090fba48567cf85665272cec5ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Fri, 23 Jan 2026 16:02:24 +0100 Subject: [PATCH 2/6] Also add compilers to actual toolchain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan André Reuter --- easybuild/toolchains/rocm_compilers.py | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 easybuild/toolchains/rocm_compilers.py diff --git a/easybuild/toolchains/rocm_compilers.py b/easybuild/toolchains/rocm_compilers.py new file mode 100644 index 0000000000..61d1f8da64 --- /dev/null +++ b/easybuild/toolchains/rocm_compilers.py @@ -0,0 +1,45 @@ +## +# Copyright 2013-2025 Ghent University +# +# This file is triple-licensed under GPLv2 (see below), MIT, and +# BSD three-clause licenses. +# +# This file is part of EasyBuild, +# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), +# with support of Ghent University (http://ugent.be/hpc), +# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), +# Flemish Research Foundation (FWO) (http://www.fwo.be/en) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# https://github.com/easybuilders/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +EasyBuild support for Clang + Flang compiler toolchain. + +Authors: + +* Jan Reuter (jan@zyten.de) +""" + +from easybuild.toolchains.gcccore import GCCcore +from easybuild.toolchains.compiler.rocm_compilers import ROCmCompilers +from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME + + +class ROCmCompilersToolchain(LLVMCompilers): + """Compiler toolchain with AMDClang and AMDFlang compilers.""" + NAME = 'rocm-compilers' # Follows naming scheme used for intel-compilers & nvidia-compilers + COMPILER_MODULE_NAME = [NAME] + SUBTOOLCHAIN = [GCCcore.NAME, SYSTEM_TOOLCHAIN_NAME] From a37bef7baf31725b6901a8a214739a2c2bc42721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Fri, 23 Jan 2026 16:08:05 +0100 Subject: [PATCH 3/6] Fix imported compiler for ROCm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan André Reuter --- easybuild/toolchains/rocm_compilers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/toolchains/rocm_compilers.py b/easybuild/toolchains/rocm_compilers.py index 61d1f8da64..ffaa6146e2 100644 --- a/easybuild/toolchains/rocm_compilers.py +++ b/easybuild/toolchains/rocm_compilers.py @@ -38,7 +38,7 @@ from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME -class ROCmCompilersToolchain(LLVMCompilers): +class ROCmCompilersToolchain(ROCmCompilers): """Compiler toolchain with AMDClang and AMDFlang compilers.""" NAME = 'rocm-compilers' # Follows naming scheme used for intel-compilers & nvidia-compilers COMPILER_MODULE_NAME = [NAME] From 2c7cc34c72b01d9b4aa9661367dcc7a242f37349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Fri, 23 Jan 2026 16:09:24 +0100 Subject: [PATCH 4/6] Fix toolchain constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan André Reuter --- easybuild/toolchains/compiler/rocm_compilers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/toolchains/compiler/rocm_compilers.py b/easybuild/toolchains/compiler/rocm_compilers.py index 58ffb0de49..5e9cb9b3d7 100644 --- a/easybuild/toolchains/compiler/rocm_compilers.py +++ b/easybuild/toolchains/compiler/rocm_compilers.py @@ -36,12 +36,12 @@ from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME from easybuild.tools.toolchain.compiler import LLVMCompilers -TC_CONSTANT_LLVM = "ROCm" +TC_CONSTANT_ROCM = "ROCm" class ROCmCompilers(LLVMCompilers): """Compiler toolchain with ROCm compilers (amdclang/amdflang).""" - COMPILER_FAMILY = TC_CONSTANT_LLVM + COMPILER_FAMILY = TC_CONSTANT_ROCM SUBTOOLCHAIN = SYSTEM_TOOLCHAIN_NAME COMPILER_CC = 'amdclang' From a3e15c06b65115399fea5192c676fe4332a73604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Fri, 23 Jan 2026 16:10:26 +0100 Subject: [PATCH 5/6] Fix LLVM import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan André Reuter --- easybuild/toolchains/compiler/rocm_compilers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/toolchains/compiler/rocm_compilers.py b/easybuild/toolchains/compiler/rocm_compilers.py index 5e9cb9b3d7..d64fabc10d 100644 --- a/easybuild/toolchains/compiler/rocm_compilers.py +++ b/easybuild/toolchains/compiler/rocm_compilers.py @@ -34,7 +34,7 @@ """ from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME -from easybuild.tools.toolchain.compiler import LLVMCompilers +from easybuild.tools.toolchain.compiler.llvm_compilers import LLVMCompilers TC_CONSTANT_ROCM = "ROCm" From c69bd8bf417dfa0d79b2598908fdc38a65dd4eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Fri, 23 Jan 2026 16:11:52 +0100 Subject: [PATCH 6/6] Another fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan André Reuter --- easybuild/toolchains/compiler/rocm_compilers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/toolchains/compiler/rocm_compilers.py b/easybuild/toolchains/compiler/rocm_compilers.py index d64fabc10d..a3fff72984 100644 --- a/easybuild/toolchains/compiler/rocm_compilers.py +++ b/easybuild/toolchains/compiler/rocm_compilers.py @@ -34,7 +34,7 @@ """ from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME -from easybuild.tools.toolchain.compiler.llvm_compilers import LLVMCompilers +from easybuild.toolchains.compiler.llvm_compilers import LLVMCompilers TC_CONSTANT_ROCM = "ROCm"