Skip to content

Commit 803bdb8

Browse files
committed
update for failing import
Signed-off-by: Suguna Velury <[email protected]>
1 parent da137ab commit 803bdb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modelopt/torch/quantization/qtensor/base_qtensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
from torch.distributed.fsdp._fully_shard._fsdp_param import FSDPParam
2424
from torch.distributed.tensor import DTensor
2525

26-
from modelopt.torch.quantization.utils import enable_fake_quant, fsdp2_aware_weight_update
27-
2826

2927
class QTensorType(enum.Enum):
3028
"""Enumeration for defining types of quantization."""
@@ -234,6 +232,8 @@ def _compress_fsdp_module(fsdp_module):
234232
Returns:
235233
None
236234
"""
235+
from modelopt.torch.quantization.utils import enable_fake_quant, fsdp2_aware_weight_update
236+
237237
# Unshard FSDPmodule by temporarily setting _fake_quant to prevent weight compression from being triggered
238238
with enable_fake_quant(fsdp_module):
239239
fsdp_module.unshard()

0 commit comments

Comments
 (0)