[Perf] Optimize Fp8BlockScaledMMLinearKernel input_scale tensor using new_empty() (#43677)
Signed-off-by: Xin Yang <xyangx@amazon.com>
This commit is contained in:
@@ -126,7 +126,7 @@ class Fp8BlockScaledMMLinearKernel(
|
|||||||
# always Tensors. Subclasses with apply_input_quant=False must not
|
# always Tensors. Subclasses with apply_input_quant=False must not
|
||||||
# use As in apply_block_scaled_mm.
|
# use As in apply_block_scaled_mm.
|
||||||
input_scale = (
|
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(
|
output = self.apply_block_scaled_mm(
|
||||||
|
|||||||
Reference in New Issue
Block a user