[Kernel] Set sgl_per_token_group_quant_8bit_v2 as default choice (#22467)

This commit is contained in:
Baizhou Zhang
2026-04-11 01:59:57 -07:00
committed by GitHub
parent 4f45472f34
commit d14d368191
5 changed files with 29 additions and 19 deletions
+2 -3
View File
@@ -109,10 +109,9 @@ def sgl_per_token_group_quant_8bit(
masked_m: Optional[torch.Tensor] = None,
enable_v2: Optional[bool] = None,
) -> None:
_V2_KERNEL_SUPPORTED_GROUP_SIZES = [16, 32, 64, 128]
if enable_v2 is None:
from sglang.srt.utils import get_bool_env_var
enable_v2 = get_bool_env_var("SGLANG_PER_TOKEN_GROUP_QUANT_8BIT_V2")
enable_v2 = group_size in _V2_KERNEL_SUPPORTED_GROUP_SIZES
if enable_v2:
return torch.ops.sgl_kernel.sgl_per_token_group_quant_8bit_v2.default(