[CI/Build][AMD] Install triton_kernels via CMake (#50328)

Signed-off-by: Ryan Rock <ryan.rock@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: depthfirst-app[bot] <184448029+depthfirst-app[bot]@users.noreply.github.com>
Co-authored-by: root <root@smci355-ccs-aus-m11-05.cs-aus.dcgpu>
This commit is contained in:
Ryan Rock
2026-07-30 22:05:19 -05:00
committed by GitHub
co-authored by Andreas Karatzas depthfirst-app[bot] <184448029+depthfirst-app[bot]@users.noreply.github.com> root
parent 4689c7dd61
commit 6724051c57
3 changed files with 20 additions and 30 deletions
+11 -6
View File
@@ -1,7 +1,5 @@
# Install OpenAI triton_kernels from https://github.com/triton-lang/triton/tree/main/python/triton_kernels
set(DEFAULT_TRITON_KERNELS_TAG "v3.5.1")
# Set TRITON_KERNELS_SRC_DIR for use with local development with vLLM. We expect TRITON_KERNELS_SRC_DIR to
# be directly set to the triton_kernels python directory.
if (DEFINED ENV{TRITON_KERNELS_SRC_DIR})
@@ -12,13 +10,20 @@ if (DEFINED ENV{TRITON_KERNELS_SRC_DIR})
)
else()
set(TRITON_GIT "https://github.com/triton-lang/triton.git")
message (STATUS "[triton_kernels] Fetch from ${TRITON_GIT}:${DEFAULT_TRITON_KERNELS_TAG}")
if (VLLM_TARGET_DEVICE STREQUAL "rocm")
set(TRITON_GIT "https://github.com/ROCm/triton.git")
# Pinned from release/internal/3.6.x
set(TRITON_KERNELS_TAG "0f380657dbf3ee86eb57558ff71df24f03b5d4e7")
else()
set(TRITON_GIT "https://github.com/triton-lang/triton.git")
set(TRITON_KERNELS_TAG "v3.5.1")
endif()
message (STATUS "[triton_kernels] Fetch from ${TRITON_GIT}:${TRITON_KERNELS_TAG}")
FetchContent_Declare(
triton_kernels
# TODO (varun) : Fetch just the triton_kernels directory from Triton
GIT_REPOSITORY https://github.com/triton-lang/triton.git
GIT_TAG ${DEFAULT_TRITON_KERNELS_TAG}
GIT_REPOSITORY ${TRITON_GIT}
GIT_TAG ${TRITON_KERNELS_TAG}
GIT_PROGRESS TRUE
SOURCE_SUBDIR python/triton_kernels/triton_kernels
)