Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

CompiledModel Class

This class represents a compiled model.

Definition

Namespace: OpenVinoSharp
Assembly: OpenVINO_CSharp_API (in OpenVINO_CSharp_API.dll) Version: 2024.3.0.2+a9617c0f8f80882646d0eba11b88ae6cb17b3fb8
C#
public class CompiledModel : IDisposable
Inheritance
Object    CompiledModel
Implements
IDisposable

Remarks

A model is compiled by a specific device by applying multiple optimization transformations, then mapping to compute kernels.

Constructors

CompiledModel Default Constructor
CompiledModel(IntPtr) Constructs CompiledModel from the initialized ptr.

Properties

Ptr [private]CompiledModel class pointer.

Methods

create_infer_request Creates an inference request object used to infer the compiled model. The created request has allocated input and output tensors (which can be changed later).
Dispose Release unmanaged resources
export_model Exports the current compiled model to an output model_path. The exported model can also be imported via the ov::Core::import_model method.
Finalize CompiledModel()'s destructor
(Overrides ObjectFinalize)
get_context Returns pointer to device-specific shared context on a remote accelerator device that was used to create this CompiledModel.
get_input Get a const single input port of compiled_model, which only support single input compiled_model.
get_input(String) Get a const input port of compiled_model by name.
get_input(UInt64) Get a const input port of compiled_model by port index.
get_inputs_size Get the input size of compiled_model.
get_output Get a const single output port of compiled_model, which only support single output model.
get_output(String) Get a const output port of compiled_model by name.
get_output(UInt64) Get a const output port of compiled_model by port index.
get_outputs_size Get the output size of compiled_model.
get_property(PropertyKey) Gets properties for current compiled model
get_property(String) Gets properties for current compiled model
get_runtime_model Gets runtime model information from a device.
input Gets a single input of a compiled model.
input(String) Gets input of a compiled model identified by @p tensor_name.
input(UInt64) Gets input of a compiled model identified by @p index.
inputs Gets all inputs of a compiled model.
output Gets a single output of a compiled model.
output(String) Gets output of a compiled model identified by @p tensor_name.
output(UInt64) Gets output of a compiled model identified by @p index.
outputs Get all outputs of a compiled model.
set_property(KeyValuePairPropertyKey, String) Sets properties for the current compiled model.
set_property(KeyValuePairString, String) Sets properties for the current compiled model.

Fields

m_ptr [private]CompiledModel class pointer.

See Also