Skip to content

Commit

Permalink
[SW-184689] Adjust correct condition for one step flow
Browse files Browse the repository at this point in the history
align to 1.17

Change-Id: I588680b463a9f8304d95863306b6d5b2503e6e62
  • Loading branch information
ulivne committed Jul 28, 2024
1 parent ae9d934 commit a5b6ef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neural_compressor/torch/algorithms/fp8_quant/fp8_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def prepare(self, model):
return model

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

0 comments on commit a5b6ef8

Please sign in to comment.