[Perf] Optimize Fp8BlockScaledMMLinearKernel input_scale tensor using new_empty() (#43677)

Signed-off-by: Xin Yang <xyangx@amazon.com>
This commit is contained in:
Xin Yang
2026-05-26 19:55:52 -07:00
committed by GitHub
parent 5bdb181df5
commit d8eebe6d97
@@ -126,7 +126,7 @@ class Fp8BlockScaledMMLinearKernel(
# always Tensors. Subclasses with apply_input_quant=False must not
# use As in apply_block_scaled_mm.
input_scale = (
input_scale if input_scale is not None else input_2d.new_ones(1)
input_scale if input_scale is not None else input_2d.new_empty(1)
)
output = self.apply_block_scaled_mm(