From 24b988ccc60092f56e28d22903d3b5ae02b70c96 Mon Sep 17 00:00:00 2001 From: jiqing-feng Date: Wed, 11 Dec 2024 12:12:59 +0000 Subject: [PATCH] fix ruff check Signed-off-by: jiqing-feng --- optimum/intel/ipex/modeling_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optimum/intel/ipex/modeling_base.py b/optimum/intel/ipex/modeling_base.py index a040fdcf5..de004db40 100644 --- a/optimum/intel/ipex/modeling_base.py +++ b/optimum/intel/ipex/modeling_base.py @@ -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)