Skip to content

Conversation

@Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Jun 17, 2025

@github-actions
Copy link

github-actions bot commented Jun 17, 2025

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

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.3.1-gfbf-2024a-CUDA-12.6.0.eb
index faf07dfa01..4d121fa7a9 100644
--- a/easybuild/easyconfigs/t/Triton/Triton-2.3.1-foss-2023b-CUDA-12.4.0.eb
+++ b/easybuild/easyconfigs/t/Triton/Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb
@@ -1,7 +1,7 @@
 easyblock = 'PythonBundle'
 
 name = 'Triton'
-version = '2.3.1'
+version = '3.3.1'
 versionsuffix = '-CUDA-%(cudaver)s'
 
 homepage = 'https://triton-lang.org/'
@@ -10,27 +10,29 @@ 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)
@@ -40,26 +42,28 @@ components = [
     # 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 | \
+    #   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.3.52', {
+    ('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.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',
+            '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', '5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372', {
+    ('LLVM', 'a66376b0dc3b2ea8a84fda26faca287980986f78', {
         'easyblock': 'CMakeNinja',
         'source_urls': ['https://github.com/llvm/llvm-project/archive/'],
         'sources': [{
@@ -67,8 +71,8 @@ components = [
             'filename': 'llvm-project-%(version)s.tar.gz',
         }],
         'checksums': [
-            {'llvm-project-5e5a22caf88ac1ccfa8dc5720295fdeba0ad9372.tar.gz':
-             '9d9ae8ae30f6262ca0823493893398ea2ab6fbd49027e338e06ac7c25bb8caf4'},
+            {'llvm-project-a66376b0dc3b2ea8a84fda26faca287980986f78.tar.gz':
+             '10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d'},
         ],
         'start_dir': 'llvm-project-%(version)s',
         'separate_build_dir': 'llvm_build_dir',
@@ -86,12 +90,13 @@ components = [
         ]),
         'srcdir': 'llvm',
         'skipsteps': ['install'],
-    })
+    }),
 ]
 
 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 +119,38 @@ 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.3.1_disable-git-submodule-call.patch',
+            'Triton-3.3.1_disable-git-version-check.patch',
+        ],
         'checksums': [
-            {'Triton-2.3.1.tar.gz': '07d67f6e00de85cb4cace1fe716a22e6eaf623712137d21276445392d0475c44'},
-            {'Triton-2.3.1_disable-dependency-download.patch':
-             '8a768a27b378521967f91536cd13ff315efb966d2dc6a9710c8818c60fb688fe'},
+            {'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'},
         ],
         'start_dir': 'python',
     }),
 ]
 
+postinstallpatches = [('triton_test.py', 'test/triton_test.py')]
+
+checksums = [
+    {'triton_test.py': '02a3390a5dbe27385358ab319cf10972cd8b51aca599a6809efea612a90ecdba'},
+]
+
+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.3.1-gfbf-2024a-CUDA-12.6.0.eb
index 3b582de38e..4d121fa7a9 100644
--- a/easybuild/easyconfigs/t/Triton/Triton-3.1.0-foss-2024a-CUDA-12.6.0.eb
+++ b/easybuild/easyconfigs/t/Triton/Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb
@@ -1,14 +1,8 @@
-# Update 3.1.0: Thomas Hoffmann, EMBL Heidelberg, [email protected], 2024/12
-
 easyblock = 'PythonBundle'
 
 name = 'Triton'
-
-version = '3.1.0'
+version = '3.3.1'
 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,36 +10,60 @@ 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, {
+    # 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', {
         'easyblock': 'CMakeNinja',
         'source_urls': ['https://github.com/llvm/llvm-project/archive/'],
         'sources': [{
@@ -53,65 +71,86 @@ components = [
             'filename': 'llvm-project-%(version)s.tar.gz',
         }],
         'checksums': [
-            {'llvm-project-10dc3a8e916d73291269e5e2b82dd22681489aa1.tar.gz':
-             '6ee5e0f9a49d41b5f48ebc4613ce3371f686bf70fcece9f849aba3c37bdeb3e8'},
+            {'llvm-project-a66376b0dc3b2ea8a84fda26faca287980986f78.tar.gz':
+             '10eb1d36aabbc5d31c9d2af27844f51638d40be28975a4ab20ad13609f7da23d'},
         ],
         '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"',
+        ]),
         'srcdir': 'llvm',
-        'skipsteps': ['install']
-    })
+        'skipsteps': ['install'],
+    }),
 ]
 
-_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_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"',
+    '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.3.1_disable-git-submodule-call.patch',
+            'Triton-3.3.1_disable-git-version-check.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.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'},
         ],
+        'start_dir': 'python',
     }),
 ]
 
+postinstallpatches = [('triton_test.py', 'test/triton_test.py')]
+
+checksums = [
+    {'triton_test.py': '02a3390a5dbe27385358ab319cf10972cd8b51aca599a6809efea612a90ecdba'},
+]
+
+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'
Diff against Triton-2.1.0-foss-2023a-CUDA-12.1.1.eb

easybuild/easyconfigs/t/Triton/Triton-2.1.0-foss-2023a-CUDA-12.1.1.eb

diff --git a/easybuild/easyconfigs/t/Triton/Triton-2.1.0-foss-2023a-CUDA-12.1.1.eb b/easybuild/easyconfigs/t/Triton/Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb
index 0998821a59..4d121fa7a9 100644
--- a/easybuild/easyconfigs/t/Triton/Triton-2.1.0-foss-2023a-CUDA-12.1.1.eb
+++ b/easybuild/easyconfigs/t/Triton/Triton-3.3.1-gfbf-2024a-CUDA-12.6.0.eb
@@ -1,7 +1,7 @@
-easyblock = 'PythonPackage'
+easyblock = 'PythonBundle'
 
 name = 'Triton'
-version = '2.1.0'
+version = '3.3.1'
 versionsuffix = '-CUDA-%(cudaver)s'
 
 homepage = 'https://triton-lang.org/'
@@ -10,44 +10,147 @@ 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': '2023a'}
+toolchain = {'name': 'gfbf', 'version': '2024a'}
 
-github_account = 'openai'
-source_urls = [GITHUB_LOWER_SOURCE]
-sources = ['v%(version)s.tar.gz']
-patches = [
-    '%(name)s-%(version)s-disable_rocm_support.patch',
-    '%(name)s-%(version)s-use_eb_env_python_build.patch',
+builddependencies = [
+    ('CMake', '3.29.3'),
+    ('Ninja', '1.12.1'),
+    ('nlohmann_json', '3.11.3'),
+    # LLVM dependencies
+    ('git', '2.45.1'),
+    ('libxml2', '2.12.7'),
+    ('lit', '18.1.7'),
+    ('ncurses', '6.5'),
 ]
-checksums = [
-    {'v2.1.0.tar.gz': '4338ca0e80a059aec2671f02bfc9320119b051f378449cf5f56a1273597a3d99'},
-    {'Triton-2.1.0-disable_rocm_support.patch': 'e4d7c0947c3287b3f0871a004e8b483963f637c9fa3ef6212ac3a34660de2a7c'},
-    {'Triton-2.1.0-use_eb_env_python_build.patch': 'd68bf766c699ad6a778d9449d3bccdadc2f20f1f86ba13e1359ad297b12fbf7c'},
+
+dependencies = [
+    ('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
+    ('zstd', '1.5.6'),
+    ('zlib', '1.3.1'),
 ]
 
-builddependencies = [
-    ('Clang', '17.0.0_20230515', versionsuffix),  # this is the exact commit that would be downloaded by Triton
-    ('CMake', '3.26.3'),
+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', {
+        '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'},
+        ],
+        'start_dir': 'llvm-project-%(version)s',
+        '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"',
+        ]),
+        'srcdir': 'llvm',
+        'skipsteps': ['install'],
+    }),
 ]
 
-dependencies = [
-    ('CUDA', '12.1.1', '', SYSTEM),
-    ('Python', '3.11.3'),
-    ('PyTorch', '2.1.2', versionsuffix),
+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"',
+    '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, {
+        # 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': 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',
+        ],
+        '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'},
+        ],
+        'start_dir': 'python',
+    }),
 ]
 
-start_dir = 'python'
+postinstallpatches = [('triton_test.py', 'test/triton_test.py')]
 
-preinstallopts = 'export LLVM_INCLUDE_DIRS=$EBROOTCLANG/include && '
-preinstallopts += 'export LLVM_LIBRARY_DIR=$EBROOTCLANG/lib && '
-preinstallopts += 'export LLVM_SYSPATH=$EBROOTCLANG && '
-preinstallopts += 'export TRITON_BUILD_WITH_CLANG_LLD=1 && '
+checksums = [
+    {'triton_test.py': '02a3390a5dbe27385358ab319cf10972cd8b51aca599a6809efea612a90ecdba'},
+]
 
-# make pip print output of cmake
-installopts = "-v "
+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',
+    # 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
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
i7007 - Linux Rocky Linux 8.9 (Green Obsidian), x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.9.18
See https://gist.github.com/Flamefire/6efa9be3af729bacb32561a77efc4efc for a full test report.

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
SUCCESS
Build succeeded for 3 out of 3 (2 easyconfigs in total)
login1.barnard.hpc.tu-dresden.de - Linux RHEL 8.9 (Ootpa), x86_64, Intel(R) Xeon(R) Platinum 8470 (sapphirerapids), Python 3.9.18
See https://gist.github.com/Flamefire/2e513dba167fed82bae0fbd7cb03a763 for a full test report.

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
c44 - Linux AlmaLinux 9.4, x86_64, AMD EPYC 9334 32-Core Processor (zen4), 4 x NVIDIA NVIDIA H100, 560.35.03, Python 3.9.18
See https://gist.github.com/Flamefire/d053dcab35f0320f2a331aafb61f6ddb for a full test report.

…s: Triton-3.3.1_disable-git-submodule-call.patch, Triton-3.3.1_disable-git-version-check.patch
@Flamefire Flamefire force-pushed the 20250617143104_new_pr_Triton331 branch from 1770ef2 to b8d2bde Compare June 18, 2025 08:45
@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3786
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
n1342 - Linux RHEL 8.9 (Ootpa), x86_64, Intel(R) Xeon(R) Platinum 8470 (sapphirerapids), Python 3.9.18
See https://gist.github.com/Flamefire/4cdcc25ac7ad243bae43147e66e6677e for a full test report.

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3786
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
i7094 - Linux Rocky Linux 8.9 (Green Obsidian), x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.9.18
See https://gist.github.com/Flamefire/c970eb2b330332fd41f745368ab3d2e2 for a full test report.

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3786
SUCCESS
Build succeeded for 35 out of 35 (2 easyconfigs in total)
c74 - Linux AlmaLinux 9.4, x86_64, AMD EPYC 9334 32-Core Processor (zen4), 4 x NVIDIA NVIDIA H100, 560.35.03, Python 3.9.18
See https://gist.github.com/Flamefire/48ed748a42282639aecbfb40188fe1de for a full test report.

This ensures the `TRITION_*_PATH` variables are set correctly and a basic example works.
Also move the lit dependency to the build deps as it is only required for tests.
@Flamefire Flamefire force-pushed the 20250617143104_new_pr_Triton331 branch from d978096 to ec98d61 Compare August 12, 2025 15:50
@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
FAILED
Build succeeded for 0 out of 1 (1 easyconfigs in total)
n1469 - Linux RHEL 8.9 (Ootpa), x86_64, Intel(R) Xeon(R) Platinum 8470 (sapphirerapids), Python 3.9.18
See https://gist.github.com/Flamefire/7ef6aac1677f6363b91d42142f29ee4c for a full test report.

@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3887
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
c144 - Linux AlmaLinux 9.4, x86_64, AMD EPYC 9334 32-Core Processor (zen4), 4 x NVIDIA NVIDIA H100, 560.35.03, Python 3.9.18
See https://gist.github.com/Flamefire/09a2a2f1b104de270f66659373300817 for a full test report.

@Thyre Thyre added the 2024a issues & PRs related to 2024a common toolchains label Aug 14, 2025
@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
i8030 - Linux Rocky Linux 8.9 (Green Obsidian), x86_64, AMD EPYC 7352 24-Core Processor (zen2), 8 x NVIDIA NVIDIA A100-SXM4-40GB, 555.42.06, Python 3.9.18
See https://gist.github.com/Flamefire/3d2cff1258a94804811a8768a29a572a for a full test report.

@verdurin
Copy link
Member

@Flamefire now that easybuilders/easybuild-framework#4980 is merged, what else is needed here? Or do you think it's ready?

@Flamefire
Copy link
Contributor Author

@Flamefire now that easybuilders/easybuild-framework#4980 is merged, what else is needed here? Or do you think it's ready?

The other framework PR is required too

@verdurin
Copy link
Member

Okay. Seems there are conflicts to be resolved in easybuilders/easybuild-easyblocks#3887

@Flamefire
Copy link
Contributor Author

The alternative is to move the postinstall patch as I had at some point: ec98d61

But I like it better this way. I'll look into the conflict

@pavelToman
Copy link
Collaborator

Test report by @pavelToman
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3887
SUCCESS
Build succeeded for 2 out of 2 (1 easyconfigs in total)
node4006.donphan.os - Linux RHEL 9.6, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz, 1 x NVIDIA NVIDIA A2, 580.82.07, Python 3.9.21
See https://gist.github.com/pavelToman/83d6e0c015a92e40f480bc6576ffb128 for a full test report.

@pavelToman
Copy link
Collaborator

Test report by @pavelToman
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3887
SUCCESS
Build succeeded for 2 out of 2 (1 easyconfigs in total)
node3908.accelgor.os - Linux RHEL 9.6, x86_64, AMD EPYC 7413 24-Core Processor, 1 x NVIDIA NVIDIA A100-SXM4-80GB, 580.82.07, Python 3.9.21
See https://gist.github.com/pavelToman/f2394af78a2a161c7046b76a409f430a for a full test report.

@pavelToman
Copy link
Collaborator

Test report by @pavelToman
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3887
SUCCESS
Build succeeded for 2 out of 2 (1 easyconfigs in total)
node4302.litleo.os - Linux RHEL 9.6, x86_64, AMD EPYC 9454P 48-Core Processor, 1 x NVIDIA NVIDIA H100 NVL, 580.82.07, Python 3.9.21
See https://gist.github.com/pavelToman/6fc424ddcf91f8a09e458f70393068dc for a full test report.

@boegel
Copy link
Member

boegel commented Oct 15, 2025

@boegelbot please test @ jsc-zen3-a100
EB_ARGS="--include-easyblocks-from-pr 3887"
CORE_CNT=16

@boegelbot
Copy link
Collaborator

@boegel: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=23120 EB_ARGS="--include-easyblocks-from-pr 3887" EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_23120 --ntasks="16" --partition=jsczen3g --gres=gpu:1 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 8402

Test results coming soon (I hope)...

- notification for comment with ID 3406069678 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Collaborator

Test report by @boegelbot
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3887
SUCCESS
Build succeeded for 2 out of 2 (1 easyconfigs in total)
jsczen3g1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.6, x86_64, AMD EPYC-Milan Processor (zen3), 1 x NVIDIA NVIDIA A100 80GB PCIe, 580.95.05, Python 3.9.21
See https://gist.github.com/boegelbot/91642052d7b3926a560a1863d212bf35 for a full test report.

@boegel
Copy link
Member

boegel commented Oct 15, 2025

Test report by @boegel
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3887
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
node3305.joltik.os - Linux RHEL 9.6, x86_64, Intel(R) Xeon(R) Gold 6242 CPU @ 2.80GHz (cascadelake), 1 x NVIDIA Tesla V100-SXM2-32GB, 580.82.07, Python 3.9.21
See https://gist.github.com/boegel/a6d955e4ae4d8ca03150446c4de6aba0 for a full test report.

@Flamefire Flamefire force-pushed the 20250617143104_new_pr_Triton331 branch from 98ef576 to de3bd9e Compare October 16, 2025 06:49
@boegel
Copy link
Member

boegel commented Oct 16, 2025

@boegelbot please test @ jsc-zen3-a100
CORE_CNT=16

@boegelbot
Copy link
Collaborator

@boegel: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de

PR test command 'if [[ develop != 'develop' ]]; then EB_BRANCH=develop ./easybuild_develop.sh 2> /dev/null 1>&2; EB_PREFIX=/home/boegelbot/easybuild/develop source init_env_easybuild_develop.sh; fi; EB_PR=23120 EB_ARGS= EB_CONTAINER= EB_REPO=easybuild-easyconfigs EB_BRANCH=develop /opt/software/slurm/bin/sbatch --job-name test_PR_23120 --ntasks="16" --partition=jsczen3g --gres=gpu:1 ~/boegelbot/eb_from_pr_upload_jsc-zen3.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 8419

Test results coming soon (I hope)...

- notification for comment with ID 3409579469 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
jsczen3g1.int.jsc-zen3.fz-juelich.de - Linux Rocky Linux 9.6, x86_64, AMD EPYC-Milan Processor (zen3), 1 x NVIDIA NVIDIA A100 80GB PCIe, 580.95.05, Python 3.9.21
See https://gist.github.com/boegelbot/1faaa5671d76ca25c4feaf2f649de4b7 for a full test report.

@akesandgren akesandgren changed the title {devel}[foss/2024a] Triton v3.3.1 w/ CUDA 12.6.0 {devel}[gfbf/2024a] Triton v3.3.1 w/ CUDA 12.6.0 Oct 16, 2025
@akesandgren
Copy link
Contributor

Test report by @akesandgren
FAILED
Build succeeded for 2 out of 3 (1 easyconfigs in total)
b-cn1611.hpc2n.umu.se - Linux Ubuntu 22.04, x86_64, AMD EPYC 7313 16-Core Processor, 1 x NVIDIA NVIDIA A100 80GB PCIe, 555.58.02, Python 3.10.12
See https://gist.github.com/akesandgren/9a23310797661f3dd8107154436d1020 for a full test report.

@boegel
Copy link
Member

boegel commented Oct 16, 2025

Test report by @boegel
SUCCESS
Build succeeded for 2 out of 2 (1 easyconfigs in total)
node3301.joltik.os - Linux RHEL 9.6, x86_64, Intel(R) Xeon(R) Gold 6242 CPU @ 2.80GHz (cascadelake), 1 x NVIDIA Tesla V100-SXM2-32GB, 580.82.07, Python 3.9.21
See https://gist.github.com/boegel/17186124d9a00bff670a6306e05b0619 for a full test report.

@boegel
Copy link
Member

boegel commented Oct 21, 2025

@akesandgren How did this happen?!

Missing checksum for cuda_nvcc-linux-x86_64-12.4.131-archive.tar.xz

@akesandgren
Copy link
Contributor

Hmm might have forgotten to update my devel tree before running that...

@akesandgren
Copy link
Contributor

Test report by @akesandgren
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
b-cn1611.hpc2n.umu.se - Linux Ubuntu 22.04, x86_64, AMD EPYC 7313 16-Core Processor, 1 x NVIDIA NVIDIA A100 80GB PCIe, 580.95.05, Python 3.10.12
See https://gist.github.com/akesandgren/30bd281e14890010cd0272621156da47 for a full test report.

Copy link
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

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

LGTM

@akesandgren
Copy link
Contributor

Going in, thanks @Flamefire!

@akesandgren akesandgren merged commit 6db3671 into easybuilders:develop Oct 21, 2025
8 checks passed
@Flamefire Flamefire deleted the 20250617143104_new_pr_Triton331 branch October 21, 2025 12:22
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.

7 participants