From 7a0f9480dc73406cae52d41978e200c082050cc3 Mon Sep 17 00:00:00 2001 From: Aayush Joglekar Date: Fri, 17 Apr 2026 12:56:44 +0200 Subject: [PATCH 1/6] Add AMD compute capabilities env if detected --- EESSI-extend-easybuild.eb | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index fa62b010..cf04eb9a 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -93,27 +93,31 @@ working_dir = os.getenv("WORKING_DIR") or pathJoin("/tmp", os.getenv("USER")) -- Gather the EPREFIX to use as a sysroot sysroot = os.getenv("EESSI_EPREFIX") --- Check if we have GPU capabilities and configure CUDA compute capabilities +-- Check if we have GPU capabilities and configure AMD/CUDA compute capabilities eessi_accelerator_target = os.getenv("EESSI_ACCELERATOR_TARGET") if (eessi_accelerator_target ~= nil) then cuda_compute_capability = string.match(eessi_accelerator_target, "^accel/nvidia/cc([0-9]+)$") + amd_compute_capability = string.match(eessi_accelerator_target, "^accel/amd/(gfx[0-9a-f]+)$") + if (cuda_compute_capability ~= nil) then -- The last digit should be the minor version, insert a dot in the one-but-last position major_version = cuda_compute_capability:sub(1, #cuda_compute_capability - 1) minor_version = cuda_compute_capability:sub(#cuda_compute_capability) easybuild_cuda_compute_capabilities = string.format("%s.%s", major_version, minor_version) + + -- If architectures are 9.0, 10.0 or 12.0, enable architecture or family-specific optimizations + if easybuild_cuda_compute_capabilities == '9.0' then + easybuild_cuda_compute_capabilities = '9.0a' + elseif easybuild_cuda_compute_capabilities == '10.0' then + easybuild_cuda_compute_capabilities = '10.0f' + elseif easybuild_cuda_compute_capabilities == '12.0' then + easybuild_cuda_compute_capabilities = '12.0f' + end + elseif (amd_compute_capability ~= nil) then + easybuild_amdgcn_compute_capabilities = amd_compute_capability else LmodError("Incorrect value for $EESSI_ACCELERATOR_TARGET: " .. eessi_accelerator_target) end - - -- If architectures are 9.0, 10.0 or 12.0, enable architecture or family-specific optimizations - if easybuild_cuda_compute_capabilities == '9.0' then - easybuild_cuda_compute_capabilities = '9.0a' - elseif easybuild_cuda_compute_capabilities == '10.0' then - easybuild_cuda_compute_capabilities = '10.0f' - elseif easybuild_cuda_compute_capabilities == '12.0' then - easybuild_cuda_compute_capabilities = '12.0f' - end end -- Some environment variables affect behaviour, let's gather them once @@ -202,6 +206,11 @@ if (easybuild_cuda_compute_capabilities ~= nil) then setenv ("EASYBUILD_CUDA_COMPUTE_CAPABILITIES", easybuild_cuda_compute_capabilities) end +-- Set environment variables if building for AMDGCN compute capabilities +if (easybuild_amdgcn_compute_capabilities ~= nil) then + setenv ("EASYBUILD_AMDGCN_COMPUTE_CAPABILITIES", easybuild_amdgcn_compute_capabilities) +end + -- Set all related environment variables if we have project or user installations (including extending MODULEPATH) if (user_modulepath ~= nil) then -- Use a more restrictive umask for this case From d1a699d290608f590aa12f1bee40fe4e92469c40 Mon Sep 17 00:00:00 2001 From: Aayush Joglekar Date: Fri, 17 Apr 2026 13:47:24 +0200 Subject: [PATCH 2/6] (temporary): add ROCm-LLVM to easystack --- .../2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml diff --git a/easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml b/easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml new file mode 100644 index 00000000..ec4a270a --- /dev/null +++ b/easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml @@ -0,0 +1,2 @@ +easyconfigs: + - ROCm-LLVM-19.0.0-GCCcore-14.2.0-ROCm-6.4.1.eb From ec8e7e47f3366ad08f26757183247243b1f92e30 Mon Sep 17 00:00:00 2001 From: ocaisa Date: Fri, 17 Apr 2026 15:06:40 +0200 Subject: [PATCH 3/6] Apply suggestion from @ocaisa --- EESSI-extend-easybuild.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index cf04eb9a..977dbe0a 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -208,7 +208,7 @@ end -- Set environment variables if building for AMDGCN compute capabilities if (easybuild_amdgcn_compute_capabilities ~= nil) then - setenv ("EASYBUILD_AMDGCN_COMPUTE_CAPABILITIES", easybuild_amdgcn_compute_capabilities) + setenv ("EASYBUILD_AMDGCN_CAPABILITIES", easybuild_amdgcn_compute_capabilities) end -- Set all related environment variables if we have project or user installations (including extending MODULEPATH) From fe82aa8e2742f8ca2accff61cbc5ba2ec1ce9283 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:02:14 +0200 Subject: [PATCH 4/6] Delete easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml --- .../2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml diff --git a/easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml b/easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml deleted file mode 100644 index ec4a270a..00000000 --- a/easystacks/software.eessi.io/2025.06/accel/amd/eessi-2025.06-eb-5.3.0-001-system.yml +++ /dev/null @@ -1,2 +0,0 @@ -easyconfigs: - - ROCm-LLVM-19.0.0-GCCcore-14.2.0-ROCm-6.4.1.eb From 63e2f55987ac5d37cb42c8a9d3f829c1ba5476ea Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 22 Apr 2026 00:56:38 +0200 Subject: [PATCH 5/6] Add AMD case to tests_eessi_module --- .github/workflows/tests_eessi_module.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 65ca858b..c5579376 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -78,6 +78,7 @@ jobs: - accel/nvidia/cc80 # This should fall back to cc70 but that is checked later (in this step we just check for consistency) - accel/nvidia/cc77 + - accel/amd/gfx90a steps: - name: Check out software-layer repository @@ -165,12 +166,15 @@ jobs: - none - accel/nvidia/cc80 - accel/nvidia/cc77 + - accel/amd/gfx90a include: # For each override we expect a specific path (which may differ from the original due to overrides) - EESSI_ACCELERATOR_TARGET_OVERRIDE: accel/nvidia/cc80 FINAL_ACCELERATOR_TARGET_EXPECTED: accel/nvidia/cc80 - EESSI_ACCELERATOR_TARGET_OVERRIDE: accel/nvidia/cc77 # deliberately chose a non-existent CUDA capability FINAL_ACCELERATOR_TARGET_EXPECTED: accel/nvidia/cc70 # this reverts to the fallback case (which does exist) + - EESSI_ACCELERATOR_TARGET_OVERRIDE: accel/amd/gfx90a + FINAL_ACCELERATOR_TARGET_EXPECTED: accel/amd/gfx90a steps: - name: Check out software-layer repository From 93168780fa048b5a46b462f06a44f5b9dfc45cae Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 22 Apr 2026 01:11:02 +0200 Subject: [PATCH 6/6] Revert changes, since the necessary prerequisites aren't in place yet for this to pass (e.g. the accelerator dir doesnt exist yet in CVMFS) --- .github/workflows/tests_eessi_module.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index c5579376..65ca858b 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -78,7 +78,6 @@ jobs: - accel/nvidia/cc80 # This should fall back to cc70 but that is checked later (in this step we just check for consistency) - accel/nvidia/cc77 - - accel/amd/gfx90a steps: - name: Check out software-layer repository @@ -166,15 +165,12 @@ jobs: - none - accel/nvidia/cc80 - accel/nvidia/cc77 - - accel/amd/gfx90a include: # For each override we expect a specific path (which may differ from the original due to overrides) - EESSI_ACCELERATOR_TARGET_OVERRIDE: accel/nvidia/cc80 FINAL_ACCELERATOR_TARGET_EXPECTED: accel/nvidia/cc80 - EESSI_ACCELERATOR_TARGET_OVERRIDE: accel/nvidia/cc77 # deliberately chose a non-existent CUDA capability FINAL_ACCELERATOR_TARGET_EXPECTED: accel/nvidia/cc70 # this reverts to the fallback case (which does exist) - - EESSI_ACCELERATOR_TARGET_OVERRIDE: accel/amd/gfx90a - FINAL_ACCELERATOR_TARGET_EXPECTED: accel/amd/gfx90a steps: - name: Check out software-layer repository