Skip to content

Commit cb1dfca

Browse files
minor bug
Signed-off-by: cliu-us <[email protected]>
1 parent 049df45 commit cb1dfca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fms_mo/utils/aiu_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def process_zero_shift(
288288
a_cvn = model.state_dict()[a_cvn_name]
289289

290290
# compute "zero_shift" correction factor only for asymmetric activations
291-
if a_cv is not None and a_cvn is not None and torch.equal(a_cv, -a_cvn):
291+
if not (a_cv is None or a_cvn is None or torch.equal(a_cv, -a_cvn)):
292292
if weight_int is None:
293293
logger.info(
294294
f"As weights appear to be not quantized, zero shift for {k} "

0 commit comments

Comments
 (0)