From 205b7ac058068d7f259913c5dc7f39a092c0049c Mon Sep 17 00:00:00 2001 From: endenis Date: Tue, 25 Aug 2026 20:29:44 +0200 Subject: [PATCH] fix(deps): use PyTorch 2.13 to fix SM89 hangs --- freetoken-kernel-cache/pyproject.toml | 4 ++-- pyproject.toml | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/freetoken-kernel-cache/pyproject.toml b/freetoken-kernel-cache/pyproject.toml index ec37efbf..05d31d58 100644 --- a/freetoken-kernel-cache/pyproject.toml +++ b/freetoken-kernel-cache/pyproject.toml @@ -8,7 +8,7 @@ requires = [ # 77 is the first release that understands the PEP 639 `license` SPDX string below. "setuptools>=77", "wheel", - "torch>=2.11,<2.12", + "torch>=2.13,<2.14", "apache-tvm-ffi==0.1.13.post3", ] build-backend = "build_backend" @@ -22,7 +22,7 @@ requires-python = ">=3.10" license = "Apache-2.0" dependencies = ["apache-tvm-ffi==0.1.13.post3"] -# Provenance pin: PyPI's torch 2.11.0 is itself the cu130 build, but this index serves +# Provenance pin: PyPI's torch 2.13.0 is itself the cu130 build, but this index serves # ONLY cu130 wheels, so an isolated build can never resolve a different-CUDA torch and # stamp the wheel +cu126/+cu128. uv applies these to build-system.requires when this # directory is the build root. Mirrors ../pyproject.toml. diff --git a/pyproject.toml b/pyproject.toml index 8bd653f8..8fa209f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ # own, and a mismatch links the C++ extensions against the wrong libtorch. # setuptools floor: 77 is the first release that understands the PEP 639 `license` # SPDX string and `license-files` below. -requires = ["setuptools>=77", "torch>=2.11,<2.12", "wheel"] +requires = ["setuptools>=77", "torch>=2.13,<2.14", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -51,13 +51,14 @@ dependencies = [ "pydantic>=2.9,<3", "pyzmq>=27,<28", "safetensors>=0.6,<1", - # floor+ceiling: sglang-kernel 0.4.5 links libtorch symbols only 2.11 has. - # PyPI's torch 2.11.0 wheel is itself the cu130 build, so plain pip resolves + # floor: 2.13 contains the SM89 row-wise FP8 hang fix. + # ceiling: sglang-kernel 0.4.6.post1 is built against the PyTorch 2.13 ABI. + # PyPI's torch 2.13.0 wheel is itself the cu130 build, so plain pip resolves # correctly from PyPI alone; uv additionally pins the index below. - "torch>=2.11,<2.12", + "torch>=2.13,<2.14", "tqdm>=4.66,<5", "transformers>=5.5,<6", - "triton==3.6.0; platform_system == 'Linux'", + "triton==3.7.1; platform_system == 'Linux'", "uvicorn>=0.30,<1", ] @@ -76,7 +77,7 @@ dev = ["pytest>=6.0"] # `freetoken[accel]` for the full native fast path. fi = ["flashinfer-python[cu13]>=0.6,<0.7"] # renamed from sgl-kernel at 0.4; still imports as `sgl_kernel`, so never co-install both -sgl = ["sglang-kernel==0.4.5"] +sgl = ["sglang-kernel==0.4.6.post1"] accel = ["freetoken[fi,sgl]"] # NOTE: the Marlin W4A16 NVFP4 expert-GEMM path (sm_80-99) borrows vLLM's AOT wheel # (vllm>=0.14,<0.15), which pins transformers>=4.56,<5 and so is INCOMPATIBLE with the @@ -85,7 +86,7 @@ accel = ["freetoken[fi,sgl]"] # in a dedicated environment when you specifically need the Marlin path. # uv-only provenance pins — pip ignores this section and resolves from PyPI, which -# works: PyPI's torch 2.11.0 and sglang-kernel 0.4.5 are the same cu130 builds these +# works: PyPI's torch 2.13.0 and sglang-kernel 0.4.6.post1 are the cu130 builds these # indexes serve. `explicit = true` scopes each index to the one package that needs it # (the torch index also mirrors stale copies of common deps, e.g. packaging<=24.1, # which would otherwise shadow PyPI under uv's first-index strategy).