openvino.compile_model#

openvino.compile_model(model: Model | str | Path, device_name: str | None = 'AUTO', config: dict | None = None) CompiledModel#

Compact method to compile model with AUTO plugin.

Parameters:
  • model (Union[openvino.runtime.Model, str, pathlib.Path]) – Model acquired from read_model function or a path to a model in IR / ONNX / PDPD / TF and TFLite format.

  • device_name (str) – Optional. Name of the device to load the model to. If not specified, the default OpenVINO device will be selected by AUTO plugin.

  • config (dict, optional) – Optional dict of pairs: (property name, property value) relevant only for this load operation.

Returns:

A compiled model.

Return type:

openvino.runtime.CompiledModel