Skip to content

Commit b0ea939

Browse files
avoid init values as None
Signed-off-by: chichun-charlie-liu <[email protected]>
1 parent d05c6c4 commit b0ea939

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fms_mo/quant/quantizers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3907,7 +3907,7 @@ def forward(self, x: torch.Tensor):
39073907
return x_dequant
39083908

39093909
def init_quantization_scale(self, x: torch.Tensor, channel_wise: bool = False):
3910-
delta, zero_point = None, None
3910+
delta, zero_point = 1.0, 0 # init seems unnecessary, at least avoid None causing type chk err
39113911
if channel_wise:
39123912
x_clone = x.clone().detach()
39133913
n_channels = x_clone.shape[0]

0 commit comments

Comments
 (0)