[Kernel] Pass a device pointer into the quantize kernel for the scales (#5159)
This commit is contained in:
+1
-1
@@ -265,7 +265,7 @@ def scaled_fp8_quant(
|
||||
|
||||
# int8
|
||||
def static_scaled_int8_quant(input: torch.Tensor,
|
||||
scale: float) -> torch.Tensor:
|
||||
scale: torch.Tensor) -> torch.Tensor:
|
||||
"""
|
||||
Quantize the input tensor to int8 and return the quantized tensor.
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ class CompressedTensorsW8A8StaticTensor(CompressedTensorsScheme):
|
||||
act_scale = layer.input_scale
|
||||
|
||||
# Input quantize
|
||||
x_q = custom_ops.static_scaled_int8_quant(x, act_scale[0].item())
|
||||
x_q = custom_ops.static_scaled_int8_quant(x, act_scale)
|
||||
|
||||
return custom_ops.cutlass_scaled_mm_dq(x_q, weight.t(), act_scale,
|
||||
weight_scale, x.dtype)
|
||||
|
||||
Reference in New Issue
Block a user