in optimum/intel/openvino/modeling_base.py [0:0]
def _compile(self):
if self.parent_model._compile_only and isinstance(self.model, CompiledModel):
self.request = self.model
if self.request is None:
if (
"CACHE_DIR" not in self.ov_config.keys()
and not str(self._model_dir).startswith(gettempdir())
and "GPU" in self._device
):
self.ov_config["CACHE_DIR"] = os.path.join(self._model_dir, self._model_name, "model_cache")
logger.info(f"Compiling the {self._model_name} to {self._device} ...")
self.request = core.compile_model(self.model, self._device, self.ov_config)
# OPENVINO_LOG_LEVEL can be found in https://docs.openvino.ai/2023.2/openvino_docs_OV_UG_supported_plugins_AUTO_debugging.html
if "OPENVINO_LOG_LEVEL" in os.environ and int(os.environ["OPENVINO_LOG_LEVEL"]) > 2:
_print_compiled_model_properties(self.request)