From fd910ae6a333e1898ba98c1bdcc9bfd6f1f2de36 Mon Sep 17 00:00:00 2001 From: Ashwini Rathi Date: Thu, 27 Aug 2026 20:35:07 +0300 Subject: [PATCH 1/2] [CI] re-enable bench_jit_per_token_group_quant_8bit; pin enable_v2=False MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #450 skipped this bench because it raised `ModuleNotFoundError: No module named 'orjson'`. Root cause is that sgl_kernel.gemm.sgl_per_token_group_quant_8bit only reads `SGLANG_PER_TOKEN_GROUP_QUANT_8BIT_V2` via `sglang.srt.utils.get_bool_env_var` when `enable_v2 is None`; that path imports the full sglang package, whose common.py needs orjson, psutil, pybase64, etc. — none installed in the bench container. Passing enable_v2=False from the bench short-circuits the sglang lookup entirely. v2 is already covered by bench_jit_per_token_group_quant_8bit_v2.py, so this bench legitimately wants the v1 kernel. - bench: pin enable_v2=False in aot_per_token_group_quant_8bit. - CI: run bench_jit_per_token_group_quant_8bit.py again instead of the skip echo added in #450. --- .github/workflows/pr-test-xpu.yml | 2 +- benchmark/bench_jit_per_token_group_quant_8bit.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-test-xpu.yml b/.github/workflows/pr-test-xpu.yml index c58ed7ab2..055a2c2ef 100644 --- a/.github/workflows/pr-test-xpu.yml +++ b/.github/workflows/pr-test-xpu.yml @@ -121,7 +121,7 @@ jobs: python3 bench_jit_qknorm.py 2>&1 | tee bench_jit_qknorm.py.log python3 bench_jit_rope.py 2>&1 | tee bench_jit_rope.py.log python3 bench_jit_timestep_embedding.py 2>&1 | tee bench_jit_timestep_embedding.py.log - echo 'Skipping bench_jit_per_token_group_quant_8bit.py (ModuleNotFoundError: sglang not installed in bench container; re-enable once sgl_kernel/gemm.py no longer imports sglang.srt.utils at call time)' + python3 bench_jit_per_token_group_quant_8bit.py 2>&1 | tee bench_jit_per_token_group_quant_8bit.py.log python3 bench_hc_post.py 2>&1 | tee bench_hc_post.py.log python3 bench_jit_moe_topk_sigmoid.py 2>&1 | tee bench_jit_moe_topk_sigmoid.py.log python3 bench_jit_moe_fused_gate.py 2>&1 | tee bench_jit_moe_fused_gate.py.log diff --git a/benchmark/bench_jit_per_token_group_quant_8bit.py b/benchmark/bench_jit_per_token_group_quant_8bit.py index 9668b804f..d1b2b1712 100644 --- a/benchmark/bench_jit_per_token_group_quant_8bit.py +++ b/benchmark/bench_jit_per_token_group_quant_8bit.py @@ -63,10 +63,15 @@ def aot_per_token_group_quant_8bit(x, group_size, dst_dtype, eps=1e-10): x_q = torch.empty_like(x, dtype=dst_dtype) x_s = torch.empty((m, n // group_size), device=x.device, dtype=torch.float32) min_8bit, max_8bit = _minmax(dst_dtype) + # Pin v1; enable_v2=None would import sglang (not in bench container). if dst_dtype == torch.int8: - sgl_per_token_group_quant_int8(x, x_q, x_s, group_size, eps, min_8bit, max_8bit) + sgl_per_token_group_quant_int8( + x, x_q, x_s, group_size, eps, min_8bit, max_8bit, enable_v2=False + ) else: - sgl_per_token_group_quant_fp8(x, x_q, x_s, group_size, eps, min_8bit, max_8bit) + sgl_per_token_group_quant_fp8( + x, x_q, x_s, group_size, eps, min_8bit, max_8bit, enable_v2=False + ) return x_q, x_s From 9dc42e06b8e5d21c149ce8ffa32723885a00cef9 Mon Sep 17 00:00:00 2001 From: Ashwini Rathi Date: Thu, 27 Aug 2026 20:40:23 +0300 Subject: [PATCH 2/2] retrigger CI