Skip to content

Commit 836d508

Browse files
committed
nit
1 parent f384133 commit 836d508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchao/quantization/quant_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ def apply_int4_weight_only_quant(weight):
682682
zero_point_dtype = torch.bfloat16
683683

684684
nonlocal zero_point_domain
685-
assert any(isinstance(layout, support_layout) for support_layout in LAYOUT_TO_ZERO_POINT_DOMAIN.keys()), f"Only support layout: {LAYOUT_TO_ZERO_POINT_DOMAIN.keys()}"
685+
assert type(layout) in LAYOUT_TO_ZERO_POINT_DOMAIN.keys(), f"Only support layout: {LAYOUT_TO_ZERO_POINT_DOMAIN.keys()}"
686686
if zero_point_domain is None:
687687
# the first value is the default one
688688
zero_point_domain = LAYOUT_TO_ZERO_POINT_DOMAIN[type(layout)][0]

0 commit comments

Comments
 (0)