Skip to content

Commit a5b6ef8

Browse files
committed
[SW-184689] Adjust correct condition for one step flow
align to 1.17 Change-Id: I588680b463a9f8304d95863306b6d5b2503e6e62
1 parent ae9d934 commit a5b6ef8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neural_compressor/torch/algorithms/fp8_quant/fp8_quant.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def prepare(self, model):
3838
return model
3939

4040
def convert(self, model):
41-
if getattr(model, "prepared", False) and with_patched_module(model): # if model was calibrated on hpu
42-
finish_measurements(model)
41+
if with_patched_module(model): # if model was calibrated on hpu
42+
finish_measurements(model) # dump the measurements into files to be loaded in _convert
4343
# for INC flow, it calls `prepare` and then `convert` user-facing API in one run
4444
restore_patched_module(model)
4545
_convert(model, self.quant_config)

0 commit comments

Comments
 (0)