Skip to content

Commit

Permalink
fix ruff check
Browse files Browse the repository at this point in the history
Signed-off-by: jiqing-feng <[email protected]>
  • Loading branch information
jiqing-feng committed Dec 11, 2024
1 parent 2ac7ecf commit 24b988c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimum/intel/ipex/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ def maybe_apply_torch_compile(self):
return
if self.use_cache and not self._supports_static_cache:
return
from torch._inductor import config
from torch._inductor import config as inductor_config

# System level optimization
torch._inductor.config.cpp_wrapper = True
inductor_config.cpp_wrapper = True
os.environ["TORCHINDUCTOR_FREEZING"] = "1"
logger.info("Enable torch.compile optimization")
self.model.forward = torch.compile(self.model.forward)
Expand Down

0 comments on commit 24b988c

Please sign in to comment.