[bugfix][quantization] Fix fp8 per_tensor scale shape (#30257)
Signed-off-by: Haoyang Li <lihaoyang0109@gmail.com>
This commit is contained in:
@@ -1726,7 +1726,7 @@ def scaled_fp8_quant(
|
||||
output, input, scale, scale_ub
|
||||
)
|
||||
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)
|
||||
else:
|
||||
assert scale.numel() == 1, f"{scale.shape}"
|
||||
|
||||
Reference in New Issue
Block a user