This commit is contained in:
@@ -315,20 +315,14 @@ if [ "${CUSTOM_BUILD_SGL_KERNEL:-}" = "true" ] && [ -d "sgl-kernel/dist" ]; then
|
||||
WHEEL_ARCH="x86_64"
|
||||
fi
|
||||
# Wheel filenames carry a +cuXYZ local version tag (e.g. sglang_kernel-0.4.0+cu130-...).
|
||||
# When the build matrix produces wheels for multiple CUDA versions (e.g. both cu129 and cu130),
|
||||
# pick the one matching the test runner's $CU_VERSION so we don't trigger the PyPI-fallback reinstall
|
||||
# below (which would replace the PR-built wheel with a public main-branch wheel).
|
||||
KERNEL_WHL=$(ls sgl-kernel/dist/sglang_kernel-${SGL_KERNEL_VERSION_FROM_KERNEL}+${CU_VERSION}-cp310-abi3-manylinux2014_${WHEEL_ARCH}.whl 2>/dev/null | head -1)
|
||||
if [ -z "$KERNEL_WHL" ]; then
|
||||
# Fallback for older branches that only build a single CUDA variant and whose wheel matches
|
||||
# the current $CU_VERSION. Restrict to the same arch — we intentionally do NOT match a wheel
|
||||
# whose +cuXYZ tag disagrees with $CU_VERSION here, because the post-install reinstall branch
|
||||
# below would otherwise silently replace it with the public main-branch wheel.
|
||||
SINGLE_CUDA_WHL=$(ls sgl-kernel/dist/sglang_kernel-${SGL_KERNEL_VERSION_FROM_KERNEL}-cp310-abi3-manylinux2014_${WHEEL_ARCH}.whl 2>/dev/null | head -1)
|
||||
if [ -n "$SINGLE_CUDA_WHL" ]; then
|
||||
KERNEL_WHL="$SINGLE_CUDA_WHL"
|
||||
fi
|
||||
fi
|
||||
# Pick the one matching the test runner's $CU_VERSION; any other tag (or an untagged
|
||||
# wheel of unknown CUDA origin) would at best hit the PyPI-reinstall branch below and
|
||||
# silently replace the PR-built wheel with the public main-branch wheel, and at worst
|
||||
# ABI-crash at cuInit. Better to fail loudly — the error message + dist/ listing below
|
||||
# makes the diagnosis obvious.
|
||||
# `|| true` swallows `ls`'s exit-2-on-no-match so `set -o pipefail` doesn't abort the
|
||||
# script before we reach the explicit error check.
|
||||
KERNEL_WHL=$(ls sgl-kernel/dist/sglang_kernel-${SGL_KERNEL_VERSION_FROM_KERNEL}+${CU_VERSION}-cp310-abi3-manylinux2014_${WHEEL_ARCH}.whl 2>/dev/null | head -1 || true)
|
||||
if [ -z "$KERNEL_WHL" ]; then
|
||||
echo "ERROR: No matching sgl-kernel wheel found in sgl-kernel/dist/ for version ${SGL_KERNEL_VERSION_FROM_KERNEL} arch ${WHEEL_ARCH} cuda ${CU_VERSION}"
|
||||
ls -alh sgl-kernel/dist/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Align CUDA wheel filenames (+cu124/+cu128/+cu130) with internal METADATA Version and
|
||||
# Align CUDA wheel filenames (+cu124/+cu128/+cu129/+cu130) with internal METADATA Version and
|
||||
# WHEEL tags after build (fixes pip "inconsistent version" when only the .whl name changed).
|
||||
# Unpack → patch WHEEL/METADATA → wheel pack (RECORD regenerated; no hand-editing).
|
||||
set -ex
|
||||
@@ -11,6 +11,8 @@ detect_cuda_suffix() {
|
||||
echo "+cu124"
|
||||
elif ls /usr/local/ 2>/dev/null | grep -q "12.8"; then
|
||||
echo "+cu128"
|
||||
elif ls /usr/local/ 2>/dev/null | grep -q "12.9"; then
|
||||
echo "+cu129"
|
||||
elif ls /usr/local/ 2>/dev/null | grep -q "13.0"; then
|
||||
echo "+cu130"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user