Data Structures | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
InferenceEngine::IInferencePlugin Interface Reference

An API of plugin to be implemented by a plugin. More...

#include <ie_iplugin_internal.hpp>

Inheritance diagram for InferenceEngine::IInferencePlugin:

Public Types

using Ptr = std::shared_ptr< IInferencePlugin >
 A shared pointer to IInferencePlugin interface.
 

Public Member Functions

void SetVersion (const Version &version)
 Sets a plugin version. More...
 
const VersionGetVersion () const
 Gets a plugin version. More...
 
virtual std::string GetName () const noexcept
 Provides a name of a plugin. More...
 
virtual void SetName (const std::string &name) noexcept
 Sets a name for a plugin. More...
 
virtual std::shared_ptr< IExecutableNetworkInternalLoadNetwork (const CNNNetwork &network, const std::map< std::string, std::string > &config)
 Creates an executable network from an pares network object, users can create as many networks as they need and use them simultaneously (up to the limitation of the HW resources) More...
 
virtual std::shared_ptr< IExecutableNetworkInternalLoadNetwork (const CNNNetwork &network, const std::map< std::string, std::string > &config, const std::shared_ptr< RemoteContext > &context)
 Creates an executable network from network object, on specified remote context. More...
 
virtual std::shared_ptr< IExecutableNetworkInternalLoadNetwork (const std::string &modelPath, const std::map< std::string, std::string > &config)
 Creates an executable network from model file path. More...
 
virtual void AddExtension (const std::shared_ptr< IExtension > &extension)
 Registers extension within plugin. More...
 
virtual void SetConfig (const std::map< std::string, std::string > &config)
 Sets configuration for plugin, acceptable keys can be found in ie_plugin_config.hpp. More...
 
virtual Parameter GetConfig (const std::string &name, const std::map< std::string, Parameter > &options) const
 Gets configuration dedicated to plugin behaviour. More...
 
virtual Parameter GetMetric (const std::string &name, const std::map< std::string, Parameter > &options) const
 Gets general runtime metric for dedicated hardware. More...
 
virtual std::shared_ptr< RemoteContextCreateContext (const ParamMap &params)
 Creates a remote context instance based on a map of parameters. More...
 
virtual std::shared_ptr< RemoteContextGetDefaultContext (const ParamMap &params)
 Provides a default remote context instance if supported by a plugin. More...
 
virtual std::shared_ptr< IExecutableNetworkInternalImportNetwork (const std::string &modelFileName, const std::map< std::string, std::string > &config)
 Creates an executable network from an previously exported network. More...
 
virtual std::shared_ptr< IExecutableNetworkInternalImportNetwork (std::istream &networkModel, const std::map< std::string, std::string > &config)
 Creates an executable network from an previously exported network using plugin implementation and removes Inference Engine magic and plugin name. More...
 
virtual std::shared_ptr< IExecutableNetworkInternalImportNetwork (std::istream &networkModel, const std::shared_ptr< RemoteContext > &context, const std::map< std::string, std::string > &config)
 Creates an executable network from an previously exported network using plugin implementation and removes Inference Engine magic and plugin name. More...
 
virtual void SetCore (ICore *core)
 Sets pointer to ICore interface. More...
 
virtual ICoreGetCore () const noexcept
 Gets reference to ICore interface. More...
 
virtual QueryNetworkResult QueryNetwork (const CNNNetwork &network, const std::map< std::string, std::string > &config) const
 Queries a plugin about supported layers in network. More...
 

Protected Member Functions

virtual std::shared_ptr< IExecutableNetworkInternalLoadExeNetworkImpl (const CNNNetwork &network, const std::map< std::string, std::string > &config)
 Creates an executable network from a parsed network object, users can create as many networks as they need and use them simultaneously (up to the limitation of the HW resources) More...
 
virtual std::shared_ptr< IExecutableNetworkInternalLoadExeNetworkImpl (const CNNNetwork &network, const std::shared_ptr< RemoteContext > &context, const std::map< std::string, std::string > &config)
 Creates an executable network using remote context from a parsed network object, users can create as many networks as they need and use them simultaneously (up to the limitation of the HW resources) More...
 
void SetExeNetworkInfo (const std::shared_ptr< IExecutableNetworkInternal > &exeNetwork, const ConstInputsDataMap &inputs, const ConstOutputsDataMap &outputs)
 Set input and output information to executable network. This method is used to set addtional information to InferenceEngine::IExecutableNetworkInternal create by device plugin. More...
 

Protected Attributes

std::string _pluginName
 A device name that plugins enables.
 
std::map< std::string, std::string > _config
 A map config keys -> values.
 
ICore_core = nullptr
 A pointer to ICore interface.
 

Detailed Description

An API of plugin to be implemented by a plugin.

Member Function Documentation

◆ AddExtension()

virtual void InferenceEngine::IInferencePlugin::AddExtension ( const std::shared_ptr< IExtension > &  extension)
virtual

Registers extension within plugin.

Parameters
extension- pointer to already loaded extension

◆ CreateContext()

virtual std::shared_ptr<RemoteContext> InferenceEngine::IInferencePlugin::CreateContext ( const ParamMap params)
virtual

Creates a remote context instance based on a map of parameters.

Parameters
[in]paramsThe map of parameters
Returns
A remote context object

◆ GetConfig()

virtual Parameter InferenceEngine::IInferencePlugin::GetConfig ( const std::string &  name,
const std::map< std::string, Parameter > &  options 
) const
virtual

Gets configuration dedicated to plugin behaviour.

Parameters
name- value of config corresponding to config key
options- configuration details for config
Returns
Value of config corresponding to config key

◆ GetCore()

virtual ICore* InferenceEngine::IInferencePlugin::GetCore ( ) const
virtualnoexcept

Gets reference to ICore interface.

Returns
Reference to ICore interface

◆ GetDefaultContext()

virtual std::shared_ptr<RemoteContext> InferenceEngine::IInferencePlugin::GetDefaultContext ( const ParamMap params)
virtual

Provides a default remote context instance if supported by a plugin.

Parameters
[in]paramsThe map of parameters
Returns
The default context.

◆ GetMetric()

virtual Parameter InferenceEngine::IInferencePlugin::GetMetric ( const std::string &  name,
const std::map< std::string, Parameter > &  options 
) const
virtual

Gets general runtime metric for dedicated hardware.

Parameters
name- metric name to request
options- configuration details for metric
Returns
Metric value corresponding to metric key

◆ GetName()

virtual std::string InferenceEngine::IInferencePlugin::GetName ( ) const
virtualnoexcept

Provides a name of a plugin.

Returns
The name.

◆ GetVersion()

const Version& InferenceEngine::IInferencePlugin::GetVersion ( ) const

Gets a plugin version.

Returns
A const InferenceEngine::Version object

◆ ImportNetwork() [1/3]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::ImportNetwork ( const std::string &  modelFileName,
const std::map< std::string, std::string > &  config 
)
virtual

Creates an executable network from an previously exported network.

Deprecated:
Use ImportNetwork(std::istream& networkModel, const std::map<std::string, std::string>& config)
Parameters
modelFileName- path to the location of the exported file
configA string -> string map of parameters
Returns
An Executable network

◆ ImportNetwork() [2/3]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::ImportNetwork ( std::istream &  networkModel,
const std::map< std::string, std::string > &  config 
)
virtual

Creates an executable network from an previously exported network using plugin implementation and removes Inference Engine magic and plugin name.

Parameters
networkModelReference to network model output stream
configA string -> string map of parameters
Returns
An Executable network

◆ ImportNetwork() [3/3]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::ImportNetwork ( std::istream &  networkModel,
const std::shared_ptr< RemoteContext > &  context,
const std::map< std::string, std::string > &  config 
)
virtual

Creates an executable network from an previously exported network using plugin implementation and removes Inference Engine magic and plugin name.

Parameters
networkModelReference to network model output stream
contextA pointer to plugin context derived from RemoteContext class used to execute the network
configA string -> string map of parameters
Returns
An Executable network

◆ LoadExeNetworkImpl() [1/2]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::LoadExeNetworkImpl ( const CNNNetwork network,
const std::map< std::string, std::string > &  config 
)
protectedvirtual

Creates an executable network from a parsed network object, users can create as many networks as they need and use them simultaneously (up to the limitation of the HW resources)

Note
The function is used in InferencePluginInternal::LoadNetwork(const CNNNetwork&, const std::map<std::string, std::string>&) which performs common steps first and calls this plugin-dependent method implementation after.
Parameters
networkA network object
configstring-string map of config parameters relevant only for this load operation
Returns
Shared pointer to the ExecutableNetwork object

◆ LoadExeNetworkImpl() [2/2]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::LoadExeNetworkImpl ( const CNNNetwork network,
const std::shared_ptr< RemoteContext > &  context,
const std::map< std::string, std::string > &  config 
)
protectedvirtual

Creates an executable network using remote context from a parsed network object, users can create as many networks as they need and use them simultaneously (up to the limitation of the HW resources)

Note
The function is used in InferencePluginInternal::LoadNetwork(const CNNNetwork&, const std::map<std::string, std::string>&, RemoteContext::Ptr) which performs common steps first and calls this plugin-dependent method implementation after.
Parameters
networkA network object
contextA remote context
configstring-string map of config parameters relevant only for this load operation
Returns
Shared pointer to the ExecutableNetwork object

◆ LoadNetwork() [1/3]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::LoadNetwork ( const CNNNetwork network,
const std::map< std::string, std::string > &  config 
)
virtual

Creates an executable network from an pares network object, users can create as many networks as they need and use them simultaneously (up to the limitation of the HW resources)

Parameters
networkA network object acquired from InferenceEngine::Core::ReadNetwork
configA string-string map of config parameters relevant only for this load operation
Returns
Created Executable Network object

◆ LoadNetwork() [2/3]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::LoadNetwork ( const CNNNetwork network,
const std::map< std::string, std::string > &  config,
const std::shared_ptr< RemoteContext > &  context 
)
virtual

Creates an executable network from network object, on specified remote context.

Parameters
networkA network object acquired from InferenceEngine::Core::ReadNetwork
configstring-string map of config parameters relevant only for this load operation
contextA pointer to plugin context derived from RemoteContext class used to execute the network
Returns
Created Executable Network object

◆ LoadNetwork() [3/3]

virtual std::shared_ptr<IExecutableNetworkInternal> InferenceEngine::IInferencePlugin::LoadNetwork ( const std::string &  modelPath,
const std::map< std::string, std::string > &  config 
)
virtual

Creates an executable network from model file path.

Parameters
modelPathA path to model
configA string-string map of config parameters relevant only for this load operation
Returns
Created Executable Network object

◆ QueryNetwork()

virtual QueryNetworkResult InferenceEngine::IInferencePlugin::QueryNetwork ( const CNNNetwork network,
const std::map< std::string, std::string > &  config 
) const
virtual

Queries a plugin about supported layers in network.

Parameters
[in]networkThe network object to query
[in]configThe map of configuration parameters
Returns
The result of query operator containing supported layers map

◆ SetConfig()

virtual void InferenceEngine::IInferencePlugin::SetConfig ( const std::map< std::string, std::string > &  config)
virtual

Sets configuration for plugin, acceptable keys can be found in ie_plugin_config.hpp.

Parameters
configstring-string map of config parameters

◆ SetCore()

virtual void InferenceEngine::IInferencePlugin::SetCore ( ICore core)
virtual

Sets pointer to ICore interface.

Parameters
corePointer to Core interface

◆ SetExeNetworkInfo()

void InferenceEngine::IInferencePlugin::SetExeNetworkInfo ( const std::shared_ptr< IExecutableNetworkInternal > &  exeNetwork,
const ConstInputsDataMap inputs,
const ConstOutputsDataMap outputs 
)
protected

Set input and output information to executable network. This method is used to set addtional information to InferenceEngine::IExecutableNetworkInternal create by device plugin.

Parameters
exeNetworkAn executable network object to set information to
inputsAn input information to set
outputsAn output information to set

◆ SetName()

virtual void InferenceEngine::IInferencePlugin::SetName ( const std::string &  name)
virtualnoexcept

Sets a name for a plugin.

Parameters
[in]nameThe name

◆ SetVersion()

void InferenceEngine::IInferencePlugin::SetVersion ( const Version version)

Sets a plugin version.

Parameters
versionA version to set

The documentation for this interface was generated from the following file: