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