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

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

#include <ie_iplugin_internal.hpp>

Inheritance diagram for InferenceEngine::IInferencePlugin:
InferenceEngine::InferencePluginInternal

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...
 
Version GetVersion () const
 Gets a plugin version. More...
 
void Release () noexcept override
 
virtual std::string GetName () const noexcept=0
 Provides a name of a plugin. More...
 
virtual void SetName (const std::string &name) noexcept=0
 Sets a name for a plugin. More...
 
virtual ExecutableNetwork LoadNetwork (const CNNNetwork &network, const std::map< std::string, std::string > &config)=0
 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 ExecutableNetwork LoadNetwork (const CNNNetwork &network, const std::map< std::string, std::string > &config, RemoteContext::Ptr context)=0
 Creates an executable network from network object, on specified remote context. More...
 
virtual void AddExtension (InferenceEngine::IExtensionPtr extension)=0
 Registers extension within plugin. More...
 
virtual void SetConfig (const std::map< std::string, std::string > &config)=0
 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 =0
 Gets configuration dedicated to plugin behaviour. More...
 
virtual Parameter GetMetric (const std::string &name, const std::map< std::string, Parameter > &options) const =0
 Gets general runtime metric for dedicated hardware. More...
 
virtual RemoteContext::Ptr CreateContext (const ParamMap &params)=0
 Creates a remote context instance based on a map of parameters. More...
 
virtual RemoteContext::Ptr GetDefaultContext (const ParamMap &params)=0
 Provides a default remote context instance if supported by a plugin. More...
 
virtual ExecutableNetwork ImportNetwork (const std::string &modelFileName, const std::map< std::string, std::string > &config)=0
 Creates an executable network from an previously exported network. More...
 
virtual ExecutableNetwork ImportNetwork (std::istream &networkModel, const std::map< std::string, std::string > &config)=0
 Creates an executable network from an previously exported network using plugin implementation and removes Inference Engine magic and plugin name. More...
 
virtual ExecutableNetwork ImportNetwork (std::istream &networkModel, const RemoteContext::Ptr &context, const std::map< std::string, std::string > &config)=0
 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) noexcept=0
 Sets pointer to ICore interface. More...
 
virtual ICoreGetCore () const noexcept=0
 Gets reference to ICore interface. More...
 
virtual QueryNetworkResult QueryNetwork (const CNNNetwork &network, const std::map< std::string, std::string > &config) const =0
 Queries a plugin about supported layers in network. More...
 

Protected Member Functions

 ~IInferencePlugin () override=default
 Destroys the object.
 

Detailed Description

An API of plugin to be implemented by a plugin.

Member Function Documentation

◆ AddExtension()

virtual void InferenceEngine::IInferencePlugin::AddExtension ( InferenceEngine::IExtensionPtr  extension)
pure virtual

Registers extension within plugin.

Parameters
extension- pointer to already loaded extension

Implemented in InferenceEngine::InferencePluginInternal.

◆ CreateContext()

virtual RemoteContext::Ptr InferenceEngine::IInferencePlugin::CreateContext ( const ParamMap params)
pure virtual

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

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

Implemented in InferenceEngine::InferencePluginInternal.

◆ GetConfig()

virtual Parameter InferenceEngine::IInferencePlugin::GetConfig ( const std::string &  name,
const std::map< std::string, Parameter > &  options 
) const
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ GetCore()

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

Gets reference to ICore interface.

Returns
Reference to ICore interface

Implemented in InferenceEngine::InferencePluginInternal.

◆ GetDefaultContext()

virtual RemoteContext::Ptr InferenceEngine::IInferencePlugin::GetDefaultContext ( const ParamMap params)
pure virtual

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

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

Implemented in InferenceEngine::InferencePluginInternal.

◆ GetMetric()

virtual Parameter InferenceEngine::IInferencePlugin::GetMetric ( const std::string &  name,
const std::map< std::string, Parameter > &  options 
) const
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ GetName()

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

Provides a name of a plugin.

Returns
The name.

Implemented in InferenceEngine::InferencePluginInternal.

◆ GetVersion()

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

Gets a plugin version.

Returns
A const InferenceEngine::Version object

◆ ImportNetwork() [1/3]

virtual ExecutableNetwork InferenceEngine::IInferencePlugin::ImportNetwork ( const std::string &  modelFileName,
const std::map< std::string, std::string > &  config 
)
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ ImportNetwork() [2/3]

virtual ExecutableNetwork InferenceEngine::IInferencePlugin::ImportNetwork ( std::istream &  networkModel,
const RemoteContext::Ptr context,
const std::map< std::string, std::string > &  config 
)
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ ImportNetwork() [3/3]

virtual ExecutableNetwork InferenceEngine::IInferencePlugin::ImportNetwork ( std::istream &  networkModel,
const std::map< std::string, std::string > &  config 
)
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ LoadNetwork() [1/2]

virtual ExecutableNetwork InferenceEngine::IInferencePlugin::LoadNetwork ( const CNNNetwork network,
const std::map< std::string, std::string > &  config 
)
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ LoadNetwork() [2/2]

virtual ExecutableNetwork InferenceEngine::IInferencePlugin::LoadNetwork ( const CNNNetwork network,
const std::map< std::string, std::string > &  config,
RemoteContext::Ptr  context 
)
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ QueryNetwork()

virtual QueryNetworkResult InferenceEngine::IInferencePlugin::QueryNetwork ( const CNNNetwork network,
const std::map< std::string, std::string > &  config 
) const
pure 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

Implemented in InferenceEngine::InferencePluginInternal.

◆ SetConfig()

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

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

Parameters
configstring-string map of config parameters

Implemented in InferenceEngine::InferencePluginInternal.

◆ SetCore()

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

Sets pointer to ICore interface.

Parameters
corePointer to Core interface

Implemented in InferenceEngine::InferencePluginInternal.

◆ SetName()

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

Sets a name for a plugin.

Parameters
[in]nameThe name

Implemented in InferenceEngine::InferencePluginInternal.

◆ SetVersion()

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

Sets a plugin version.

Parameters
versionA version to set

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