Public Types | Public Member Functions
InferenceEngine::IHeteroDeviceLoader Class Referenceabstract

#include <ie_ihetero_plugin.hpp>

Public Types

using  Ptr = std::shared_ptr< IHeteroDeviceLoader >
 

Public Member Functions

virtual StatusCode  LoadNetwork (const std::string &device, IExecutableNetwork::Ptr &ret, ICNNNetwork &network, const std::map< std::string, std::string > &config, ResponseDesc *resp) noexcept=0
 
virtual void  QueryNetwork (const std::string &device, const ICNNNetwork &network, QueryNetworkResult &res) noexcept=0
 
virtual void  QueryNetwork (const std::string &device, const ICNNNetwork &network, const std::map< std::string, std::string > &, QueryNetworkResult &res) noexcept
 
virtual void  SetLogCallback (IErrorListener &listener)=0
 

Detailed Description

This interface describes a mechanism of custom loaders to be used in heterogeneous plugin during setting of affinity and loading of split sub-network to the plugins The custom loader can define addition settings for the plugins or network loading Examples of cases when this interface should be implemented in the application:

  1. add custom layers to existing plugins if it is not pointed to the heterogeneous plugin or registration of custom layer is different than supported in available public plugins
  2. set affinity manually for the same plugin being initialized by different parameters, e.g different device id In this case there will be mapping of Device1 > HeteroDeviceLoaderImpl1 Device2 > HeteroDeviceLoaderImpl2 the affinity should be pointed manually, the implementation of HeteroDeviceLoaderImpl1 and HeteroDeviceLoaderImpl2 should be in the application, and these device loaders should be registered through calling of IHeteroInferencePlugin::SetDeviceLoader("Device1", HeteroDeviceLoaderImpl1) IHeteroInferencePlugin::SetDeviceLoader("Device2", HeteroDeviceLoaderImpl2)

Member Function Documentation

§ LoadNetwork()

virtual StatusCode InferenceEngine::IHeteroDeviceLoader::LoadNetwork ( const std::string &  device,
IExecutableNetwork::Ptr ret,
ICNNNetwork network,
const std::map< std::string, std::string > &  config,
ResponseDesc resp 
)
pure virtualnoexcept

Loads network to the device. The instantiation of plugin should be in the implementation of the IHeteroDeviceLoader. As well setting of special config option should happen in the implementation as well

Parameters
device Loading of network should happen for this device
ret Reference to a shared ptr of the returned executable network instance
network Network object acquired from CNNNetReader
config Map of configuration settings relevant only for current load operation
resp Pointer to the response message that holds a description of an error if any occurred
Returns
Status code of the operation. OK if succeeded

§ QueryNetwork() [1/2]

virtual void InferenceEngine::IHeteroDeviceLoader::QueryNetwork ( const std::string &  device,
const ICNNNetwork network,
QueryNetworkResult res 
)
pure virtualnoexcept

Use the version with config parameter This function calls plugin function QueryNetwork for the plugin being instantiated in the implementation of IHeteroDeviceLoader

Parameters
device QueryNetwork will be executed for this device
network Network object acquired from CNNNetReader
res

§ QueryNetwork() [2/2]

virtual void InferenceEngine::IHeteroDeviceLoader::QueryNetwork ( const std::string &  device,
const ICNNNetwork network,
const std::map< std::string, std::string > &  ,
QueryNetworkResult res 
)
inlinevirtualnoexcept

This function calls plugin function QueryNetwork for the plugin being instantiated in the implementation of IHeteroDeviceLoader

Parameters
device QueryNetwork will be executed for this device
network Network object acquired from CNNNetReader
config Network configuration parameters
res

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