Class ov::ICompiledModel#

class ICompiledModel : public std::enable_shared_from_this<ICompiledModel>#

OpenVINO ICompiledModel interface.

Public Functions

ICompiledModel(const std::shared_ptr<const ov::Model> &model, const std::shared_ptr<const ov::IPlugin> &plugin, const std::shared_ptr<ov::threading::ITaskExecutor> &task_executor = std::make_shared<ov::threading::CPUStreamsExecutor>(ov::threading::IStreamsExecutor::Config{"Default"}), const std::shared_ptr<ov::threading::ITaskExecutor> &callback_executor = std::make_shared<ov::threading::CPUStreamsExecutor>(ov::threading::IStreamsExecutor::Config{"Callback"}))#

Constructor for ICompiledModel interface.

Parameters:
  • model – OpenVINO model representation

  • plugin – Pointer to plugin

  • task_executor – Task executor (CPUStreamsExecutor by default)

  • callback_executor – Callback executor (CPUStreamsExecutor by default)

ICompiledModel(const std::shared_ptr<const ov::Model> &model, const std::shared_ptr<const ov::IPlugin> &plugin, const ov::SoPtr<ov::IRemoteContext> &context, const std::shared_ptr<ov::threading::ITaskExecutor> &task_executor = std::make_shared<ov::threading::CPUStreamsExecutor>(ov::threading::IStreamsExecutor::Config{"Default"}), const std::shared_ptr<ov::threading::ITaskExecutor> &callback_executor = std::make_shared<ov::threading::CPUStreamsExecutor>(ov::threading::IStreamsExecutor::Config{"Callback"}))#

Constructor for ICompiledModel interface with remote context.

Parameters:
  • model – OpenVINO model representation

  • plugin – Pointer to plugin

  • context – Remote context

  • task_executor – Task executor (CPUStreamsExecutor by default)

  • callback_executor – Callback executor (CPUStreamsExecutor by default)

virtual const std::vector<ov::Output<const ov::Node>> &outputs() const#

Gets all outputs from compiled model.

Returns:

model outputs

virtual const std::vector<ov::Output<const ov::Node>> &inputs() const#

Gets all inputs from compiled model.

Returns:

model inputs

virtual std::shared_ptr<ov::IAsyncInferRequest> create_infer_request() const#

Create infer request.

Returns:

Asynchronous infer request interface

virtual void export_model(std::ostream &model) const = 0#

Export compiled model to stream.

Parameters:

model – output stream

virtual std::shared_ptr<const ov::Model> get_runtime_model() const = 0#

Returns runtime model.

Returns:

OpenVINO Model which represents runtime graph

virtual void set_property(const ov::AnyMap &properties) = 0#

Allows to set property.

Parameters:

properties – new plugin properties

virtual ov::Any get_property(const std::string &name) const = 0#

Returns property.

Parameters:

nameProperty name

Returns:

Property value

ov::SoPtr<ov::IRemoteContext> get_context() const#

Creates device specific remote context.

Returns:

OpenVINO RemoteContext

virtual void release_memory()#

Release intermediate memory.