mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-07-09 17:18:38 +00:00
[fix](kt-kernel): pin torch 2.9.1 wheel baseline
Pin kt-kernel torch 2.9.1 metadata, update autosetup for cu130 wheels, register kt_kernel.kt_kernel_ext, and bump the sglang submodule.
This commit is contained in:
parent
9f34ef46e6
commit
ef5822639f
5 changed files with 17 additions and 9 deletions
|
|
@ -3,14 +3,14 @@ set -euo pipefail
|
|||
shopt -s nullglob
|
||||
|
||||
PY_LIST=${PY_LIST:-"3.11 3.12 3.13"}
|
||||
TORCH_LIST=${TORCH_LIST:-"2.11.0"}
|
||||
TORCH_LIST=${TORCH_LIST:-"2.9.1"}
|
||||
WORK_ROOT=${WORK_ROOT:-/mnt/data3/lpl/kt-kernel-autosetup}
|
||||
WHEELS_DIR=${WHEELS_DIR:-"$PWD/wheels"}
|
||||
PIP_CACHE_DIR=${PIP_CACHE_DIR:-/mnt/data3/lpl/pip-cache}
|
||||
TMP_ROOT=${TMP_ROOT:-/mnt/data3/lpl/tmp}
|
||||
FORCE=${FORCE:-0}
|
||||
REPAIR=${REPAIR:-0}
|
||||
AUDITWHEEL_PLAT=${AUDITWHEEL_PLAT:-manylinux_2_28_x86_64}
|
||||
AUDITWHEEL_PLAT=${AUDITWHEEL_PLAT:-manylinux_2_35_x86_64}
|
||||
CPUINFER_ENABLE_CPPTRACE=${CPUINFER_ENABLE_CPPTRACE:-OFF}
|
||||
|
||||
mkdir -p "$WORK_ROOT" "$WHEELS_DIR" "$PIP_CACHE_DIR" "$TMP_ROOT"
|
||||
|
|
@ -23,7 +23,7 @@ index_for_torch_version() {
|
|||
2.6.*) echo "https://download.pytorch.org/whl/cu124" ;;
|
||||
2.7.*) echo "https://download.pytorch.org/whl/cu126" ;;
|
||||
2.8.*) echo "https://download.pytorch.org/whl/cu128" ;;
|
||||
2.9.*) echo "https://download.pytorch.org/whl/cu128" ;;
|
||||
2.9.*) echo "https://download.pytorch.org/whl/cu130" ;;
|
||||
2.10.*) echo "" ;;
|
||||
2.11.*) echo "" ;;
|
||||
*) echo "https://download.pytorch.org/whl/cu124" ;;
|
||||
|
|
@ -73,9 +73,16 @@ for key, (pkg, ver) in sorted(expected.items()):
|
|||
if installed != ver:
|
||||
mismatch.append(f'{pkg}: installed {installed}, expected {ver}')
|
||||
|
||||
cusparselt = sp / 'cusparselt' / 'lib' / 'libcusparseLt.so.0'
|
||||
if not cusparselt.exists():
|
||||
mismatch.append(f'cusparselt layout missing: expected {cusparselt}')
|
||||
cusparselt_candidates = [
|
||||
sp / 'cusparselt' / 'lib' / 'libcusparseLt.so.0',
|
||||
sp / 'nvidia' / 'cusparselt' / 'lib' / 'libcusparseLt.so.0',
|
||||
]
|
||||
cusparselt = next((path for path in cusparselt_candidates if path.exists()), None)
|
||||
if cusparselt is None:
|
||||
mismatch.append(
|
||||
'cusparselt layout missing: expected one of '
|
||||
+ ', '.join(str(path) for path in cusparselt_candidates)
|
||||
)
|
||||
|
||||
if mismatch:
|
||||
print('Torch CUDA runtime stack is inconsistent:', file=sys.stderr)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ classifiers = [
|
|||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
# Core dependencies
|
||||
"torch>=2.10,<2.12",
|
||||
"torch==2.9.1",
|
||||
"safetensors>=0.4.0",
|
||||
"numpy>=1.24.0",
|
||||
"triton>=2.0.0",
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ _kt_kernel_ext, __cpu_variant__ = _initialize_cpu()
|
|||
import sys
|
||||
|
||||
sys.modules["kt_kernel_ext"] = _kt_kernel_ext
|
||||
sys.modules[f"{__name__}.kt_kernel_ext"] = _kt_kernel_ext
|
||||
|
||||
# Also expose kt_kernel_ext as an attribute for backward compatibility
|
||||
kt_kernel_ext = _kt_kernel_ext
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# You can skip this file if you already have these packages installed
|
||||
|
||||
# Core dependencies (minimum versions)
|
||||
torch>=2.10,<2.12
|
||||
torch==2.9.1
|
||||
safetensors>=0.4.0
|
||||
numpy>=1.24.0
|
||||
triton>=2.0.0
|
||||
|
|
|
|||
2
third_party/sglang
vendored
2
third_party/sglang
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 1d10fc8f953b29d3a7289b195bcd25c1d4e655bb
|
||||
Subproject commit 8a86fb89c7385d8b39a8e28ce81b6d53c77a3eb3
|
||||
Loading…
Add table
Add a link
Reference in a new issue