Skip to content

{devel}[gfbf/2024a] Triton v3.5.0 w/ CUDA 12.6.0#24793

Merged
boegel merged 6 commits intoeasybuilders:developfrom
Flamefire:20251209134030_new_pr_Triton350
Dec 16, 2025
Merged

{devel}[gfbf/2024a] Triton v3.5.0 w/ CUDA 12.6.0#24793
boegel merged 6 commits intoeasybuilders:developfrom
Flamefire:20251209134030_new_pr_Triton350

Conversation

@Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Dec 9, 2025

(created using eb --new-pr)

This is required for PyTorch 2.9+ even though there already is 3.3.1 in 2024a

@github-actions github-actions bot added 2024a issues & PRs related to 2024a common toolchains update labels Dec 9, 2025
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

Updated software Triton-3.5.0-gfbf-2024a-CUDA-12.6.0.eb

Diff against Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb

easybuild/easyconfigs/t/Triton/Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/t/Triton/Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb b/easybuild/easyconfigs/t/Triton/Triton-3.5.0-gfbf-2024a-CUDA-12.6.0.eb
index d7c0a66eb3..53da28fefd 100644
--- a/easybuild/easyconfigs/t/Triton/Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/t/Triton/Triton-3.5.0-gfbf-2024a-CUDA-12.6.0.eb
@@ -1,7 +1,7 @@
 easyblock = 'PythonBundle'
 
 name = 'Triton'
-version = '3.3.1'
+version = '3.5.0'
 versionsuffix = '-CUDA-%(cudaver)s'
 
 homepage = 'https://triton-lang.org/'
@@ -38,42 +38,15 @@ dependencies = [
 local_arch = {"arm64": "sbsa", "aarch64": "sbsa"}.get(ARCH, ARCH)
 
 components = [
-    # Use same major.minor version as Triton, see this file using the right tag instead of 'main':
-    # https://github.com/triton-lang/triton/blob/main/cmake/nvidia-toolchain-version.json
-    # Check https://developer.download.nvidia.com/compute/cuda/redist for the latest version of redistrib_*.json.
-    # Generate checksums with:
-    #   wget -O- https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.4.1.json | \
-    #     jq -r '.cuda_nvcc | to_entries[] | select(.value | type=="object") | "'\
-    #     \''" + (.value.relative_path | split("/")[-1]) + "'\'': '\''" + .value.sha256 + "'\'',"'
-    ('CUDA-NVCC', '12.4.131', {
-        'easyblock': 'MakeCp',
-        'source_urls': [f'https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/linux-{local_arch}'],
-        'sources': [f'cuda_nvcc-linux-{local_arch}-%(version)s-archive.tar.xz'],
-        'checksums': [{
-            'cuda_nvcc-linux-x86_64-12.4.131-archive.tar.xz':
-            '7ffba1ada0e4b8c17e451ac7a60d386aa2642ecd08d71202a0b100c98bd74681',
-            'cuda_nvcc-linux-ppc64le-12.4.131-archive.tar.xz':
-            '2934e83a4df2e0f4182e148753cfd1f29af226a280ea459008819531e9edb5b9',
-            'cuda_nvcc-linux-sbsa-12.4.131-archive.tar.xz':
-            '83f130dab0325e12b90fdf1279c0cbbd88acf638ef0a7e0cad72d50855a4f44a',
-            'cuda_nvcc-linux-aarch64-12.4.131-archive.tar.xz':
-            '9e7a26fb7acd86ec8d4b67799a329d9bc6bd48bbf27a89f87df4385eb7fe5758',
-        }],
-        'skipsteps': ['build'],
-        'files_to_copy': [(['cuda_nvcc-linux*/bin/ptxas'], 'tools')],
-    }),
     # Hash from cmake/llvm-hash.txt
-    ('LLVM', 'a66376b0dc3b2ea8a84fda26faca287980986f78', {
+    ('LLVM', '7d5de3033187c8a3bb4d2e322f5462cdaf49808f', {
         'easyblock': 'CMakeNinja',
         'source_urls': ['https://github.com/llvm/llvm-project/archive/'],
         'sources': [{
             'download_filename': '%(version)s.tar.gz',
             'filename': 'llvm-project-%(version)s.tar.gz',
         }],
-        'checksums': [
-            {'llvm-project-a66376b0dc3b2ea8a84fda26faca287980986f78.tar.gz':
-             '10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d'},
-        ],
+        'checksums': ['917b162698967d9fb8e3aadec09d362282cf03cc254ce4c167e265437ae1507c'],
         'start_dir': 'llvm-project-%(version)s',
         'separate_build_dir': 'llvm_build_dir',
         'configopts': ' '.join([
@@ -86,15 +59,34 @@ components = [
             '-DLLVM_ENABLE_ASSERTIONS=ON',
             '-DLLVM_OPTIMIZED_TABLEGEN=ON',
             '-DLLVM_TARGETS_TO_BUILD="Native;NVPTX;AMDGPU"',
-            '-DLLVM_ENABLE_PROJECTS="mlir;llvm"',
+            '-DLLVM_ENABLE_PROJECTS="mlir;llvm;lld"',
         ]),
         'srcdir': 'llvm',
         'skipsteps': ['install'],
     }),
+    # Use same major.minor version as Triton, see this file using the right tag instead of 'main':
+    # https://github.com/triton-lang/triton/blob/main/cmake/nvidia-toolchain-version.json
+    # Check https://developer.download.nvidia.com/compute/cuda/redist for the latest version of redistrib_*.json.
+    # Generate checksums with:
+    #   wget -O- https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8.1.json | \
+    #     jq -r '.cuda_nvcc | to_entries[] | select(.value | type=="object") | "'\
+    #     \''" + (.value.relative_path | split("/")[-1]) + "'\'': '\''" + .value.sha256 + "'\'',"'
+    ('CUDA-NVCC', '12.8.93', {
+        'easyblock': 'MakeCp',
+        'source_urls': [f'https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/linux-{local_arch}'],
+        'sources': [f'cuda_nvcc-linux-{local_arch}-%(version)s-archive.tar.xz'],
+        'checksums': [{
+            'cuda_nvcc-linux-x86_64-12.8.93-archive.tar.xz':
+            '9961b3484b6b71314063709a4f9529654f96782ad39e72bf1e00f070db8210d3',
+            'cuda_nvcc-linux-sbsa-12.8.93-archive.tar.xz':
+            'dc0b713ce69fd921aa53ac68610717d126fc273a3c554b0465cf44d7e379f467',
+        }],
+        'skipsteps': ['build'],
+        'files_to_copy': [(['cuda_nvcc-linux*/bin/ptxas'], 'tools')],
+    }),
 ]
 
 local_preinstallopts = ' '.join([
-    'TRITON_BUILD_WITH_CLANG_LLD=0',
     "TRITON_HOME='%(builddir)s/triton_home'",
     'TRITON_OFFLINE_BUILD=1',
     'TRITON_PTXAS_PATH="%(installdir)s/tools/ptxas"',
@@ -120,18 +112,12 @@ exts_list = [
         'preinstallopts': local_preinstallopts,
         'source_urls': ['https://github.com/triton-lang/triton/archive/'],
         'sources': ['v%(version)s.tar.gz'],
-        'patches': [
-            'Triton-3.3.1_disable-git-submodule-call.patch',
-            'Triton-3.3.1_disable-git-version-check.patch',
-        ],
+        'patches': ['Triton-3.5.0_fix-add_triton_ut-error.patch'],
         'checksums': [
-            {'v3.3.1.tar.gz': '9dc77d9205933bf2fc05eb054f4f1d92acd79a963826174d57fe9cfd58ba367b'},
-            {'Triton-3.3.1_disable-git-submodule-call.patch':
-             '26859c9388a4f43d326e362a625e3703f2c39a6f075af590f08660d343f78e19'},
-            {'Triton-3.3.1_disable-git-version-check.patch':
-             'e77b98e127699c189d4ca3afb0c5374c5e9f1351e82d529ae2521d3dcee70fed'},
+            {'v3.5.0.tar.gz': '426cefe3752fcce2d3ea31af4252f3fa8358b112fe1e3e112434411935644259'},
+            {'Triton-3.5.0_fix-add_triton_ut-error.patch':
+             'ca8ec6c099f25fe14791f214cdf999f63ef9b3ae2dd5bc713be8cc1938634450'},
         ],
-        'start_dir': 'python',
     }),
 ]
 
Diff against Triton-2.3.1-foss-2023b-CUDA-12.4.0.eb

easybuild/easyconfigs/t/Triton/Triton-2.3.1-foss-2023b-CUDA-12.4.0.eb

diff --git a/easybuild/easyconfigs/t/Triton/Triton-2.3.1-foss-2023b-CUDA-12.4.0.eb b/easybuild/easyconfigs/t/Triton/Triton-3.5.0-gfbf-2024a-CUDA-12.6.0.eb
index faf07dfa01..53da28fefd 100644
--- a/easybuild/easyconfigs/t/Triton/Triton-2.3.1-foss-2023b-CUDA-12.4.0.eb
+++ b/easybuild/easyconfigs/t/Triton/Triton-3.5.0-gfbf-2024a-CUDA-12.6.0.eb
@@ -1,7 +1,7 @@
 easyblock = 'PythonBundle'
 
 name = 'Triton'
-version = '2.3.1'
+version = '3.5.0'
 versionsuffix = '-CUDA-%(cudaver)s'
 
 homepage = 'https://triton-lang.org/'
@@ -10,66 +10,43 @@ description = """Triton is a language and compiler for parallel programming. It
 Python-based programming environment for productively writing custom DNN compute
 kernels capable of running at maximal throughput on modern GPU hardware."""
 
-toolchain = {'name': 'foss', 'version': '2023b'}
+toolchain = {'name': 'gfbf', 'version': '2024a'}
 
 builddependencies = [
-    ('CMake', '3.27.6'),
-    ('Ninja', '1.11.1'),
+    ('CMake', '3.29.3'),
+    ('Ninja', '1.12.1'),
+    ('nlohmann_json', '3.11.3'),
     # LLVM dependencies
-    ('git', '2.42.0'),
-    ('libxml2', '2.11.5'),
-    ('ncurses', '6.4'),
+    ('git', '2.45.1'),
+    ('libxml2', '2.12.7'),
+    ('lit', '18.1.7'),
+    ('ncurses', '6.5'),
 ]
 
 dependencies = [
-    ('CUDA', '12.4.0', '', SYSTEM),
-    ('Python', '3.11.5'),
-    ('Python-bundle-PyPI', '2023.10'),
-    ('SciPy-bundle', '2023.11'),
-    ('lit', '18.1.7'),
-    ('pybind11', '2.11.1'),
+    ('CUDA', '12.6.0', '', SYSTEM),
+    ('Python', '3.12.3'),
+    ('Python-bundle-PyPI', '2024.06'),
+    ('SciPy-bundle', '2024.05'),
+    ('pybind11', '2.12.0'),
     ('Z3', '4.13.0'),
     # LLVM dependencies
-    ('zlib', '1.2.13'),
+    ('zstd', '1.5.6'),
+    ('zlib', '1.3.1'),
 ]
 
 local_arch = {"arm64": "sbsa", "aarch64": "sbsa"}.get(ARCH, ARCH)
 
 components = [
-    # Use same major.minor version as Triton, see this file using the right tag instead of 'main':
-    # https://github.com/triton-lang/triton/blob/main/cmake/nvidia-toolchain-version.json
-    # Check https://developer.download.nvidia.com/compute/cuda/redist for the latest version of redistrib_*.json.
-    # Generate checksums with:
-    #   wget -O- https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.3.0.json | \
-    #     jq -r '.cuda_nvcc | to_entries[] | select(.value | type=="object") | "'\
-    #     \''" + (.value.relative_path | split("/")[-1]) + "'\'': '\''" + .value.sha256 + "'\'',"'
-    ('CUDA-NVCC', '12.3.52', {
-        'easyblock': 'MakeCp',
-        'source_urls': [f'https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/linux-{local_arch}'],
-        'sources': [f'cuda_nvcc-linux-{local_arch}-%(version)s-archive.tar.xz'],
-        'checksums': [{
-            'cuda_nvcc-linux-x86_64-12.3.52-archive.tar.xz':
-            '32302154a7ec122defdbb49f1c7cc8777f204c3199d9222f013046be256f72d6',
-            'cuda_nvcc-linux-ppc64le-12.3.52-archive.tar.xz':
-            'f7c647b74f2f85f5d9c42d951d810cb7130288b11d25ef7308fb489e1150232f',
-            'cuda_nvcc-linux-sbsa-12.3.52-archive.tar.xz':
-            '98940f1719b2ab1af943293601307b9e87ea71e30809d429fd7dc2e59b294c68',
-        }],
-        'skipsteps': ['build'],
-        'files_to_copy': [(['cuda_nvcc-linux*/bin/ptxas'], 'tools')],
-    }),
     # Hash from cmake/llvm-hash.txt
-    ('LLVM', '5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372', {
+    ('LLVM', '7d5de3033187c8a3bb4d2e322f5462cdaf49808f', {
         'easyblock': 'CMakeNinja',
         'source_urls': ['https://github.com/llvm/llvm-project/archive/'],
         'sources': [{
             'download_filename': '%(version)s.tar.gz',
             'filename': 'llvm-project-%(version)s.tar.gz',
         }],
-        'checksums': [
-            {'llvm-project-5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372.tar.gz':
-             '9d9ae8ae30f6262ca0823493893398ea2ab6fbd49027e338e06ac7c25bb8caf4'},
-        ],
+        'checksums': ['917b162698967d9fb8e3aadec09d362282cf03cc254ce4c167e265437ae1507c'],
         'start_dir': 'llvm-project-%(version)s',
         'separate_build_dir': 'llvm_build_dir',
         'configopts': ' '.join([
@@ -82,16 +59,36 @@ components = [
             '-DLLVM_ENABLE_ASSERTIONS=ON',
             '-DLLVM_OPTIMIZED_TABLEGEN=ON',
             '-DLLVM_TARGETS_TO_BUILD="Native;NVPTX;AMDGPU"',
-            '-DLLVM_ENABLE_PROJECTS="mlir;llvm"',
+            '-DLLVM_ENABLE_PROJECTS="mlir;llvm;lld"',
         ]),
         'srcdir': 'llvm',
         'skipsteps': ['install'],
-    })
+    }),
+    # Use same major.minor version as Triton, see this file using the right tag instead of 'main':
+    # https://github.com/triton-lang/triton/blob/main/cmake/nvidia-toolchain-version.json
+    # Check https://developer.download.nvidia.com/compute/cuda/redist for the latest version of redistrib_*.json.
+    # Generate checksums with:
+    #   wget -O- https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8.1.json | \
+    #     jq -r '.cuda_nvcc | to_entries[] | select(.value | type=="object") | "'\
+    #     \''" + (.value.relative_path | split("/")[-1]) + "'\'': '\''" + .value.sha256 + "'\'',"'
+    ('CUDA-NVCC', '12.8.93', {
+        'easyblock': 'MakeCp',
+        'source_urls': [f'https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/linux-{local_arch}'],
+        'sources': [f'cuda_nvcc-linux-{local_arch}-%(version)s-archive.tar.xz'],
+        'checksums': [{
+            'cuda_nvcc-linux-x86_64-12.8.93-archive.tar.xz':
+            '9961b3484b6b71314063709a4f9529654f96782ad39e72bf1e00f070db8210d3',
+            'cuda_nvcc-linux-sbsa-12.8.93-archive.tar.xz':
+            'dc0b713ce69fd921aa53ac68610717d126fc273a3c554b0465cf44d7e379f467',
+        }],
+        'skipsteps': ['build'],
+        'files_to_copy': [(['cuda_nvcc-linux*/bin/ptxas'], 'tools')],
+    }),
 ]
 
 local_preinstallopts = ' '.join([
-    'TRITON_BUILD_WITH_CLANG_LLD=0',
     "TRITON_HOME='%(builddir)s/triton_home'",
+    'TRITON_OFFLINE_BUILD=1',
     'TRITON_PTXAS_PATH="%(installdir)s/tools/ptxas"',
     'TRITON_CUOBJDUMP_PATH="$CUDA_HOME/bin/cubjdump"',
     'TRITON_NVDISASM_PATH="$CUDA_HOME/bin/nvdisasm"',
@@ -114,26 +111,32 @@ exts_list = [
         ],
         'preinstallopts': local_preinstallopts,
         'source_urls': ['https://github.com/triton-lang/triton/archive/'],
-        'sources': [{
-            'filename': SOURCE_TAR_GZ,
-            'download_filename': '958fccea74da58e7e0595ab88ae6cd3f6795a173.tar.gz',
-        }],
-        'patches': ['Triton-2.3.1_disable-dependency-download.patch'],
+        'sources': ['v%(version)s.tar.gz'],
+        'patches': ['Triton-3.5.0_fix-add_triton_ut-error.patch'],
         'checksums': [
-            {'Triton-2.3.1.tar.gz': '07d67f6e00de85cb4cace1fe716a22e6eaf623712137d21276445392d0475c44'},
-            {'Triton-2.3.1_disable-dependency-download.patch':
-             '8a768a27b378521967f91536cd13ff315efb966d2dc6a9710c8818c60fb688fe'},
+            {'v3.5.0.tar.gz': '426cefe3752fcce2d3ea31af4252f3fa8358b112fe1e3e112434411935644259'},
+            {'Triton-3.5.0_fix-add_triton_ut-error.patch':
+             'ca8ec6c099f25fe14791f214cdf999f63ef9b3ae2dd5bc713be8cc1938634450'},
         ],
-        'start_dir': 'python',
     }),
 ]
 
+postinstallpatches = [('triton_test.py', 'test/triton_test.py')]
+
+checksums = [
+    {'triton_test.py': '0d8b4556a76268b000d6023a1abaee801d179db3aed51e781c06854858490cc8'},
+]
+
+sanity_check_commands = ['TRITON_HOME=$TMPDIR/eb-triton_home '
+                         'python %(installdir)s/test/triton_test.py %(cuda_compute_capabilities)s']
+
 modextrapaths = {
     'TRITON_PTXAS_PATH': 'tools/ptxas',
 }
 modextravars = {
     # Search for "_path_to_binary" in Triton sources
     'TRITON_CUOBJDUMP_PATH': '$CUDA_HOME/bin/cubjdump',
-    'TRITON_LIBDEVICE_PATH': '$CUDA_HOME/nvvm/libdevice/libdevice.10.bc'
+    'TRITON_LIBDEVICE_PATH': '$CUDA_HOME/nvvm/libdevice/libdevice.10.bc',
 }
+
 moduleclass = 'devel'
Diff against Triton-3.1.0-foss-2024a-CUDA-12.6.0.eb

easybuild/easyconfigs/t/Triton/Triton-3.1.0-foss-2024a-CUDA-12.6.0.eb

diff --git a/easybuild/easyconfigs/t/Triton/Triton-3.1.0-foss-2024a-CUDA-12.6.0.eb b/easybuild/easyconfigs/t/Triton/Triton-3.5.0-gfbf-2024a-CUDA-12.6.0.eb
index 3b582de38e..53da28fefd 100644
--- a/easybuild/easyconfigs/t/Triton/Triton-3.1.0-foss-2024a-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/t/Triton/Triton-3.5.0-gfbf-2024a-CUDA-12.6.0.eb
@@ -1,14 +1,8 @@
-# Update 3.1.0: Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2024/12
-
 easyblock = 'PythonBundle'
 
 name = 'Triton'
-
-version = '3.1.0'
+version = '3.5.0'
 versionsuffix = '-CUDA-%(cudaver)s'
-# There is no 3.1 in pypi and no 3.1-tag at github. However, 5fe38ffd is version bump 3.1 in the release_3.1.x branch:
-_commit = '5fe38ffd73c2ac6ed6323b554205186696631c6f'
-_clang_commit = '10dc3a8e916d73291269e5e2b82dd22681489aa1'  # acc. to cmake/llvm-hash.txt; 2024/05/23
 
 homepage = 'https://triton-lang.org/'
 
@@ -16,102 +10,133 @@ description = """Triton is a language and compiler for parallel programming. It
 Python-based programming environment for productively writing custom DNN compute
 kernels capable of running at maximal throughput on modern GPU hardware."""
 
-toolchain = {'name': 'foss', 'version': '2024a'}
-
-github_account = 'openai'
+toolchain = {'name': 'gfbf', 'version': '2024a'}
 
 builddependencies = [
     ('CMake', '3.29.3'),
     ('Ninja', '1.12.1'),
-    ('pybind11', '2.13.6'),
-    ('poetry', '1.8.3'),
     ('nlohmann_json', '3.11.3'),
-    ('googletest', '1.15.2'),
+    # LLVM dependencies
+    ('git', '2.45.1'),
+    ('libxml2', '2.12.7'),
+    ('lit', '18.1.7'),
+    ('ncurses', '6.5'),
 ]
 
 dependencies = [
     ('CUDA', '12.6.0', '', SYSTEM),
     ('Python', '3.12.3'),
-    ('Z3', '4.13.0'),
     ('Python-bundle-PyPI', '2024.06'),
+    ('SciPy-bundle', '2024.05'),
+    ('pybind11', '2.12.0'),
+    ('Z3', '4.13.0'),
+    # LLVM dependencies
+    ('zstd', '1.5.6'),
+    ('zlib', '1.3.1'),
 ]
 
-_llvm_confopts = [
-    # acc. to:
-    # https://github.com/triton-lang/triton?tab=readme-ov-file#building-with-a-custom-llvm
-    '-DLLVM_ENABLE_ASSERTIONS=ON',
-    '-DLLVM_ENABLE_PROJECTS="mlir;llvm"',
-    '-DLLVM_TARGETS_TO_BUILD="X86;NVPTX"',
-]
+local_arch = {"arm64": "sbsa", "aarch64": "sbsa"}.get(ARCH, ARCH)
 
 components = [
-    ('LLVM', _clang_commit, {
+    # Hash from cmake/llvm-hash.txt
+    ('LLVM', '7d5de3033187c8a3bb4d2e322f5462cdaf49808f', {
         'easyblock': 'CMakeNinja',
         'source_urls': ['https://github.com/llvm/llvm-project/archive/'],
         'sources': [{
             'download_filename': '%(version)s.tar.gz',
             'filename': 'llvm-project-%(version)s.tar.gz',
         }],
-        'checksums': [
-            {'llvm-project-10dc3a8e916d73291269e5e2b82dd22681489aa1.tar.gz':
-             '6ee5e0f9a49d41b5f48ebc4613ce3371f686bf70fcece9f849aba3c37bdeb3e8'},
-        ],
+        'checksums': ['917b162698967d9fb8e3aadec09d362282cf03cc254ce4c167e265437ae1507c'],
         'start_dir': 'llvm-project-%(version)s',
-        'configopts': ' '.join(_llvm_confopts),
+        'separate_build_dir': 'llvm_build_dir',
+        'configopts': ' '.join([
+            # Reduce dependencies
+            '-DLLVM_ENABLE_BINDINGS=OFF',  # Requires OCAML
+            '-DLLVM_ENABLE_LIBEDIT=OFF',
+            # See https://github.com/triton-lang/triton/blob/develop/scripts/build-llvm-project.sh
+            '-DCMAKE_BUILD_TYPE="Release"',
+            '-DLLVM_CCACHE_BUILD=OFF',
+            '-DLLVM_ENABLE_ASSERTIONS=ON',
+            '-DLLVM_OPTIMIZED_TABLEGEN=ON',
+            '-DLLVM_TARGETS_TO_BUILD="Native;NVPTX;AMDGPU"',
+            '-DLLVM_ENABLE_PROJECTS="mlir;llvm;lld"',
+        ]),
         'srcdir': 'llvm',
-        'skipsteps': ['install']
-    })
+        'skipsteps': ['install'],
+    }),
+    # Use same major.minor version as Triton, see this file using the right tag instead of 'main':
+    # https://github.com/triton-lang/triton/blob/main/cmake/nvidia-toolchain-version.json
+    # Check https://developer.download.nvidia.com/compute/cuda/redist for the latest version of redistrib_*.json.
+    # Generate checksums with:
+    #   wget -O- https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.8.1.json | \
+    #     jq -r '.cuda_nvcc | to_entries[] | select(.value | type=="object") | "'\
+    #     \''" + (.value.relative_path | split("/")[-1]) + "'\'': '\''" + .value.sha256 + "'\'',"'
+    ('CUDA-NVCC', '12.8.93', {
+        'easyblock': 'MakeCp',
+        'source_urls': [f'https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/linux-{local_arch}'],
+        'sources': [f'cuda_nvcc-linux-{local_arch}-%(version)s-archive.tar.xz'],
+        'checksums': [{
+            'cuda_nvcc-linux-x86_64-12.8.93-archive.tar.xz':
+            '9961b3484b6b71314063709a4f9529654f96782ad39e72bf1e00f070db8210d3',
+            'cuda_nvcc-linux-sbsa-12.8.93-archive.tar.xz':
+            'dc0b713ce69fd921aa53ac68610717d126fc273a3c554b0465cf44d7e379f467',
+        }],
+        'skipsteps': ['build'],
+        'files_to_copy': [(['cuda_nvcc-linux*/bin/ptxas'], 'tools')],
+    }),
 ]
 
-_tr_start_dir = 'python'
-
-_tr_preinstallopts = 'export PYBIND11_SYSPATH=$EBROOTPYBIND11 && '
-_tr_preinstallopts += 'export JSON_SYSPATH=$EBROOTNLOHMANN_JSON && '
-# use LLVM component in builddir:
-_tr_preinstallopts += 'export PATH=%(builddir)s/easybuild_obj/bin:$PATH && '
-_tr_preinstallopts += 'export LLVM_INCLUDE_DIRS=%(builddir)s/easybuild_obj/include && '
-_tr_preinstallopts += 'export LLVM_LIBRARY_DIR=%(builddir)s/easybuild_obj/lib && '
-_tr_preinstallopts += 'export LLVM_SYSPATH=%(builddir)s/easybuild_obj/ && '
-
-_tr_preinstallopts += 'export TRITON_BUILD_WITH_CLANG_LLD=false && '
-_tr_preinstallopts += 'export TRITON_HOME=%(builddir)s && '
-# fix setup.py max_jobs - use MAX_JOBS not os.cpu_count()
-_tr_preinstallopts += 'export MAX_JOBS=%(parallel)s && '
-
-_tr_installopts = "-v "
+local_preinstallopts = ' '.join([
+    "TRITON_HOME='%(builddir)s/triton_home'",
+    'TRITON_OFFLINE_BUILD=1',
+    'TRITON_PTXAS_PATH="%(installdir)s/tools/ptxas"',
+    'TRITON_CUOBJDUMP_PATH="$CUDA_HOME/bin/cubjdump"',
+    'TRITON_NVDISASM_PATH="$CUDA_HOME/bin/nvdisasm"',
+    'LLVM_SYSPATH="%(builddir)s/llvm_build_dir"',
+    'JSON_SYSPATH="$EBROOTNLOHMANN_JSON"',
+    'PYBIND11_SYSPATH="$EBROOTPYBIND11"',
+    'MAX_JOBS=%(parallel)s',
+    # Build type
+    'DEBUG=0 REL_WITH_DEB_INFO=0 TRITON_REL_BUILD_WITH_ASSERTS=1',
+    "TRITON_APPEND_CMAKE_ARGS='-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON'",
+]) + ' '
 
 exts_list = [
     (name, version, {
-        'installopts': _tr_installopts,
-        'patches': [
-            'Triton-3.1.0_5fe38ff_eb_env_python_build.patch',
-            'Triton-3.1.0_5fe38ff_CUDA-12.6_ptx.patch',
-        ],
+        # make pip print output of cmake
+        'installopts': "-v ",
         # ensure that libdevice.10.bc from $EBROOTCUDA/nvvm/libdevice is used:
         'postinstallcmds': [
             'rm -rf %(installdir)s/lib/python%(pyshortver)s/site-packages/triton/backends/nvidia/lib/libdevice.10.bc'
         ],
-        'preinstallopts': _tr_preinstallopts,
+        'preinstallopts': local_preinstallopts,
         'source_urls': ['https://github.com/triton-lang/triton/archive/'],
-        'sources': [{
-            'filename': 'v%%(version)s-%s.tar.gz' % _commit,
-            'download_filename': '%s.tar.gz' % _commit}],
-        'start_dir': 'python',
+        'sources': ['v%(version)s.tar.gz'],
+        'patches': ['Triton-3.5.0_fix-add_triton_ut-error.patch'],
         'checksums': [
-            {'v3.1.0-5fe38ffd73c2ac6ed6323b554205186696631c6f.tar.gz':
-             '933babc32b69872efbce05fe8be61129fecf52c724fadea42d8c7b2d10e16ad9'},
-            {'Triton-3.1.0_5fe38ff_eb_env_python_build.patch':
-             '6b46064b4892c7df340b6afd7ffb4abb2ea4486df9406626cd9b2c92a748705d'},
-            {'Triton-3.1.0_5fe38ff_CUDA-12.6_ptx.patch':
-             '2be8609141375ee381364ef74d74c12af598fc0b06357689c9f32d9f2514eff4'},
+            {'v3.5.0.tar.gz': '426cefe3752fcce2d3ea31af4252f3fa8358b112fe1e3e112434411935644259'},
+            {'Triton-3.5.0_fix-add_triton_ut-error.patch':
+             'ca8ec6c099f25fe14791f214cdf999f63ef9b3ae2dd5bc713be8cc1938634450'},
         ],
     }),
 ]
 
+postinstallpatches = [('triton_test.py', 'test/triton_test.py')]
+
+checksums = [
+    {'triton_test.py': '0d8b4556a76268b000d6023a1abaee801d179db3aed51e781c06854858490cc8'},
+]
+
+sanity_check_commands = ['TRITON_HOME=$TMPDIR/eb-triton_home '
+                         'python %(installdir)s/test/triton_test.py %(cuda_compute_capabilities)s']
+
+modextrapaths = {
+    'TRITON_PTXAS_PATH': 'tools/ptxas',
+}
 modextravars = {
-    'TRITON_PTXAS_PATH': '$CUDA_HOME/bin/ptxas',
-    # ensure that libdevice.10.bc from $EBROOTCUDA/nvvm/libdevice is used:
-    'TRITON_LIBDEVICE_PATH': '$CUDA_HOME/nvvm/libdevice/libdevice.10.bc'
+    # Search for "_path_to_binary" in Triton sources
+    'TRITON_CUOBJDUMP_PATH': '$CUDA_HOME/bin/cubjdump',
+    'TRITON_LIBDEVICE_PATH': '$CUDA_HOME/nvvm/libdevice/libdevice.10.bc',
 }
 
 moduleclass = 'devel'

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
FAILED
Build succeeded for 0 out of 1 (total: 5 secs) (1 easyconfigs in total)
i7012 - Linux Rocky Linux 9.6, x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.9.21
See https://gist.github.com/Flamefire/c5519eb2c378377cedaacd2128a976bd for a full test report.

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
SUCCESS
Build succeeded for 2 out of 2 (total: 25 mins 54 secs) (2 easyconfigs in total)
c9 - Linux Rocky Linux 9.6, x86_64, AMD EPYC 9334 32-Core Processor (zen4), 4 x NVIDIA NVIDIA H100, 580.65.06, Python 3.9.21
See https://gist.github.com/Flamefire/97952562e9a36f667614f9fde2dbac34 for a full test report.

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
SUCCESS
Build succeeded for 2 out of 2 (total: 33 mins 22 secs) (2 easyconfigs in total)
i7012 - Linux Rocky Linux 9.6, x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.9.21
See https://gist.github.com/Flamefire/0e1e651d993b87c2d0488793db88c9dd for a full test report.

@boegel boegel added this to the next release (5.2.0) milestone Dec 16, 2025
@boegel boegel removed the change label Dec 16, 2025
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel
Copy link
Member

boegel commented Dec 16, 2025

Test report by @boegel
SUCCESS
Build succeeded for 2 out of 2 (total: 1 hour 17 mins 14 secs) (2 easyconfigs in total)
node3907.accelgor.os - Linux RHEL 9.6, x86_64, AMD EPYC 7413 24-Core Processor (zen3), 1 x NVIDIA NVIDIA A100-SXM4-80GB, 580.95.05, Python 3.9.21
See https://gist.github.com/boegel/05ffa95ebac3767659e996b6e70a2b7b for a full test report.

@boegel
Copy link
Member

boegel commented Dec 16, 2025

Going in, thanks @Flamefire!

@boegel boegel merged commit 9f9eda3 into easybuilders:develop Dec 16, 2025
8 checks passed
@Flamefire Flamefire deleted the 20251209134030_new_pr_Triton350 branch December 16, 2025 12:30
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 update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants