From b7d8ceb4441803ac032b2a8519dab4e1bfe05913 Mon Sep 17 00:00:00 2001 From: Mohammad Miadh Angkad Date: Sun, 3 May 2026 12:53:21 +0800 Subject: [PATCH] [CI] Keep custom sgl-kernel wheel in CUDA CI (#24291) --- scripts/ci/cuda/ci_install_dependency.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/ci/cuda/ci_install_dependency.sh b/scripts/ci/cuda/ci_install_dependency.sh index d53e52c0b..66a37310d 100755 --- a/scripts/ci/cuda/ci_install_dependency.sh +++ b/scripts/ci/cuda/ci_install_dependency.sh @@ -285,11 +285,15 @@ install_sglang_kernel() { $PIP_CMD install "torch==${TORCH_VER}" "torchaudio==${TORCHAUDIO_VER}" "torchvision==${TORCHVISION_VER}" --index-url "https://download.pytorch.org/whl/${CU_VERSION}" --force-reinstall --no-deps $PIP_INSTALL_SUFFIX fi - # install_sglang above pulls sglang-kernel from PyPI, whose default wheel - # tracks one CUDA version (currently cu130). Force-reinstall from the - # CU_VERSION-matched sglang wheel index so runners on a different CUDA - # (e.g. h20 / cu129) get a wheel linked against the right libnvrtc. - $PIP_CMD install "sglang-kernel==${SGL_KERNEL_VERSION_FROM_SRT}" --index-url "https://docs.sglang.ai/whl/${CU_VERSION}/" --force-reinstall --no-deps $PIP_INSTALL_SUFFIX + if [ "${CUSTOM_BUILD_SGL_KERNEL:-}" != "true" ]; then + # install_sglang above pulls sglang-kernel from PyPI, whose default wheel + # tracks one CUDA version (currently cu130). Force-reinstall from the + # CU_VERSION-matched sglang wheel index so runners on a different CUDA + # (e.g. h20 / cu129) get a wheel linked against the right libnvrtc. + $PIP_CMD install "sglang-kernel==${SGL_KERNEL_VERSION_FROM_SRT}" --index-url "https://docs.sglang.ai/whl/${CU_VERSION}/" --force-reinstall --no-deps $PIP_INSTALL_SUFFIX + else + echo "CUSTOM_BUILD_SGL_KERNEL=true: keeping freshly built sgl-kernel wheel." + fi mark_step_done "${FUNCNAME[0]}" }