[5/n]decouple quantization implementation from vLLM dependency (#9454)

This commit is contained in:
Hongbo Xu
2025-08-22 03:52:07 +08:00
committed by GitHub
parent 78ae175866
commit 9c8e4f69c3
4 changed files with 562 additions and 1 deletions

View File

@@ -557,7 +557,10 @@ def apply_fp8_linear(
# We also don't pad when using torch.compile,
# as it breaks with dynamic shapes.
if pad_output is None:
pad_output = not get_bool_env_var("SGLANG_ENABLE_TORCH_COMPILE")
pad_output = (
not get_bool_env_var("SGLANG_ENABLE_TORCH_COMPILE")
and not cutlass_fp8_supported
)
output_padding = 17 if pad_output else None
# View input as 2D matrix for fp8 methods