Skip to content

Commit a548dea

Browse files
committed
minor
Signed-off-by: realAsma <[email protected]>
1 parent 6d58352 commit a548dea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modelopt/torch/quantization/nn/modules/tensor_quantizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def validate_attr(
509509
):
510510
"""Validate attribute."""
511511
attr_value = attr_value if attr_value is not None else getattr(self, attr_name, None)
512-
if attr_value is None:
512+
if attr_value is None or (isinstance(attr_value, torch.Tensor) and attr_value.is_meta):
513513
return True
514514
is_valid = torch.all(attr_value >= 0) and not torch.any(torch.isinf(attr_value))
515515
if is_valid:

0 commit comments

Comments
 (0)