mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-13 16:00:19 +08:00
[bugfix][quantization] Fix fp8 per_tensor scale shape (#30257)
Signed-off-by: Haoyang Li <lihaoyang0109@gmail.com>
This commit is contained in:
parent
c72ea10723
commit
03416eada6
@ -1726,7 +1726,7 @@ def scaled_fp8_quant(
|
|||||||
output, input, scale, scale_ub
|
output, input, scale, scale_ub
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
scale = torch.empty((1, 1), device=input.device, dtype=torch.float32)
|
scale = torch.empty(1, device=input.device, dtype=torch.float32)
|
||||||
torch.ops._C.dynamic_scaled_fp8_quant(output, input, scale)
|
torch.ops._C.dynamic_scaled_fp8_quant(output, input, scale)
|
||||||
else:
|
else:
|
||||||
assert scale.numel() == 1, f"{scale.shape}"
|
assert scale.numel() == 1, f"{scale.shape}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user