Tiny let DeepGEMM scale checks cover more cases (#7182)

Co-authored-by: Yineng Zhang <me@zhyncs.com>
This commit is contained in:
fzyzcjy
2025-09-05 19:52:32 +08:00
committed by GitHub
parent 9f00ec44eb
commit 5e5c30d9ab
2 changed files with 27 additions and 10 deletions

View File

@@ -248,11 +248,6 @@ def deepgemm_w8a8_block_fp8_linear_with_fallback(
scale_ue8m0=deep_gemm_wrapper.DEEPGEMM_SCALE_UE8M0,
)
# NOTE(alcanderian): Useless when scale is packed to int32
# if get_bool_env_var("SGLANG_W8A8_DEEPGEMM_SANITY_CHECK_UE8M0"):
# _check_ue8m0("x_scale", x_scale)
# _check_ue8m0("weight_scale", ws)
output = w8a8_block_fp8_matmul_deepgemm(
q_input, weight, x_scale, weight_scale, block_size, output_dtype=output_dtype
)
@@ -261,11 +256,6 @@ def deepgemm_w8a8_block_fp8_linear_with_fallback(
return output.to(dtype=output_dtype).view(*output_shape)
def _check_ue8m0(name, x):
x_ceil = ceil_to_ue8m0(x)
assert torch.all(x == x_ceil), f"{name=} {x=} {x_ceil=}"
def aiter_w8a8_block_fp8_linear(
input: torch.Tensor,
weight: torch.Tensor,