[Kernel] Added flashinfer fp8 per-tensor gemms (#22895)

Signed-off-by: Julien Lin <jullin@nvidia.com>
Co-authored-by: Michael Goin <mgoin64@gmail.com>
This commit is contained in:
nvjullin
2025-08-26 06:54:04 -07:00
committed by GitHub
co-authored by Michael Goin
parent b78bed1bc5
commit f66673a39d
9 changed files with 198 additions and 36 deletions
@@ -223,8 +223,7 @@ class Fp8LinearMethod(LinearMethodBase):
self.fp8_linear = Fp8LinearOp(
act_quant_static=self.act_q_static,
act_quant_group_shape=self.act_q_group_shape,
cutlass_fp8_supported=cutlass_fp8_supported())
act_quant_group_shape=self.act_q_group_shape)
def create_weights(
self,
@@ -376,6 +375,8 @@ class Fp8LinearMethod(LinearMethodBase):
# Update the layer with the new values.
layer.weight = Parameter(qweight.t(), requires_grad=False)
layer.weight_scale = Parameter(weight_scale, requires_grad=False)
# layer.input_scale is None indicates dynamic quant and scale is
# computed from input.
layer.input_scale = None
# If checkpoint is fp8, handle that there are N scales for N