21.02
|
#include <IRuntime.hpp>
Classes | |
struct | CreationOptions |
Public Member Functions | |
Status | LoadNetwork (NetworkId &networkIdOut, IOptimizedNetworkPtr network) |
Loads a complete network into the IRuntime. More... | |
Status | LoadNetwork (NetworkId &networkIdOut, IOptimizedNetworkPtr network, std::string &errorMessage) |
Load a complete network into the IRuntime. More... | |
Status | LoadNetwork (NetworkId &networkIdOut, IOptimizedNetworkPtr network, std::string &errorMessage, const INetworkProperties &networkProperties) |
TensorInfo | GetInputTensorInfo (NetworkId networkId, LayerBindingId layerId) const |
TensorInfo | GetOutputTensorInfo (NetworkId networkId, LayerBindingId layerId) const |
Status | EnqueueWorkload (NetworkId networkId, const InputTensors &inputTensors, const OutputTensors &outputTensors) |
Evaluates a network using input in inputTensors and outputs filled into outputTensors. More... | |
Status | UnloadNetwork (NetworkId networkId) |
Unloads a network from the IRuntime. More... | |
const IDeviceSpec & | GetDeviceSpec () const |
const std::shared_ptr< IProfiler > | GetProfiler (NetworkId networkId) const |
Gets the profiler corresponding to the given network id. More... | |
void | RegisterDebugCallback (NetworkId networkId, const DebugCallbackFunction &func) |
Registers a callback function to debug layers performing custom computations on intermediate tensors. More... | |
Static Public Member Functions | |
static IRuntime * | CreateRaw (const CreationOptions &options) |
static IRuntimePtr | Create (const CreationOptions &options) |
static void | Destroy (IRuntime *runtime) |
Protected Member Functions | |
IRuntime () | |
IRuntime (const IRuntime::CreationOptions &options) | |
~IRuntime () | |
Protected Attributes | |
std::unique_ptr< RuntimeImpl > | pRuntimeImpl |
Definition at line 40 of file IRuntime.hpp.
|
protected |
Definition at line 26 of file Runtime.cpp.
Referenced by IRuntime::CreateRaw().
|
protected |
Definition at line 28 of file Runtime.cpp.
References IRuntime::~IRuntime().
|
protecteddefault |
Referenced by IRuntime::IRuntime().
|
static |
Definition at line 37 of file Runtime.cpp.
References IRuntime::CreateRaw(), and IRuntime::Destroy().
Referenced by BOOST_AUTO_TEST_CASE(), GetSoftmaxProfilerJson(), InferenceModel< IParser, TDataType >::InferenceModel(), main(), and NetworkQuantizer::Refine().
|
static |
Definition at line 32 of file Runtime.cpp.
References IRuntime::IRuntime().
Referenced by IRuntime::Create().
|
static |
Definition at line 42 of file Runtime.cpp.
Referenced by IRuntime::Create().
Status EnqueueWorkload | ( | NetworkId | networkId, |
const InputTensors & | inputTensors, | ||
const OutputTensors & | outputTensors | ||
) |
Evaluates a network using input in inputTensors and outputs filled into outputTensors.
Definition at line 77 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
const IDeviceSpec & GetDeviceSpec | ( | ) | const |
Definition at line 89 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
TensorInfo GetInputTensorInfo | ( | NetworkId | networkId, |
LayerBindingId | layerId | ||
) | const |
Definition at line 67 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
TensorInfo GetOutputTensorInfo | ( | NetworkId | networkId, |
LayerBindingId | layerId | ||
) | const |
Definition at line 72 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
Gets the profiler corresponding to the given network id.
networkId | The id of the network for which to get the profile. |
Definition at line 94 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
Status LoadNetwork | ( | NetworkId & | networkIdOut, |
IOptimizedNetworkPtr | network | ||
) |
Loads a complete network into the IRuntime.
[out] | networkIdOut | - Unique identifier for the network is returned in this reference. |
[in] | network | - Complete network to load into the IRuntime. The runtime takes ownership of the network once passed in. |
Definition at line 47 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
Referenced by RuntimeImpl::LoadNetwork().
Status LoadNetwork | ( | NetworkId & | networkIdOut, |
IOptimizedNetworkPtr | network, | ||
std::string & | errorMessage | ||
) |
Load a complete network into the IRuntime.
[out] | networkIdOut | Unique identifier for the network is returned in this reference. |
[in] | network | Complete network to load into the IRuntime. |
[out] | errorMessage | Error message if there were any errors. The runtime takes ownership of the network once passed in. |
Definition at line 52 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
Status LoadNetwork | ( | NetworkId & | networkIdOut, |
IOptimizedNetworkPtr | network, | ||
std::string & | errorMessage, | ||
const INetworkProperties & | networkProperties | ||
) |
Definition at line 59 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
void RegisterDebugCallback | ( | NetworkId | networkId, |
const DebugCallbackFunction & | func | ||
) |
Registers a callback function to debug layers performing custom computations on intermediate tensors.
networkId | The id of the network to register the callback. |
func | callback function to pass to the debug layer. |
Definition at line 99 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
Unloads a network from the IRuntime.
At the moment this only removes the network from the m_Impl->m_Network. This might need more work in the future to be AndroidNN compliant.
[in] | networkId | - Unique identifier for the network to be unloaded. Generated in LoadNetwork(). |
Definition at line 84 of file Runtime.cpp.
References IRuntime::pRuntimeImpl.
|
protected |
Definition at line 177 of file IRuntime.hpp.
Referenced by IRuntime::EnqueueWorkload(), IRuntime::GetDeviceSpec(), IRuntime::GetInputTensorInfo(), IRuntime::GetOutputTensorInfo(), IRuntime::GetProfiler(), IRuntime::LoadNetwork(), IRuntime::RegisterDebugCallback(), and IRuntime::UnloadNetwork().