ArmNN
NotReleased
|
#include <Runtime.hpp>
Public Member Functions | |
virtual Status | LoadNetwork (NetworkId &networkIdOut, IOptimizedNetworkPtr network) override |
virtual Status | LoadNetwork (NetworkId &networkIdOut, IOptimizedNetworkPtr network, std::string &errorMessage) override |
virtual Status | LoadNetwork (NetworkId &networkIdOut, IOptimizedNetworkPtr network, std::string &errorMessage, const INetworkProperties &networkProperties) override |
virtual TensorInfo | GetInputTensorInfo (NetworkId networkId, LayerBindingId layerId) const override |
virtual TensorInfo | GetOutputTensorInfo (NetworkId networkId, LayerBindingId layerId) const override |
virtual Status | EnqueueWorkload (NetworkId networkId, const InputTensors &inputTensors, const OutputTensors &outputTensors) override |
Evaluates a network using input in inputTensors and outputs filled into outputTensors. More... | |
virtual Status | UnloadNetwork (NetworkId networkId) override |
virtual const IDeviceSpec & | GetDeviceSpec () const override |
virtual const std::shared_ptr< IProfiler > | GetProfiler (NetworkId networkId) const override |
virtual void | RegisterDebugCallback (NetworkId networkId, const DebugCallbackFunction &func) override |
Runtime (const CreationOptions &options) | |
Creates a runtime for workload execution. More... | |
~Runtime () | |
Friends | |
void | RuntimeLoadedNetworksReserve (armnn::Runtime *runtime) |
Additional Inherited Members | |
Static Public Member Functions inherited from IRuntime | |
static IRuntime * | CreateRaw (const CreationOptions &options) |
static IRuntimePtr | Create (const CreationOptions &options) |
static void | Destroy (IRuntime *runtime) |
Protected Member Functions inherited from IRuntime | |
~IRuntime () | |
Definition at line 23 of file Runtime.hpp.
Runtime | ( | const CreationOptions & | options | ) |
Creates a runtime for workload execution.
Definition at line 155 of file Runtime.cpp.
References ProfilingService::AddBackendProfilingContext(), DeviceSpec::AddSupportedBackends(), ARMNN_LOG, ARMNN_VERSION, armnn::BackendRegistryInstance(), ProfilingService::ConfigureProfilingService(), BackendRegistry::GetFactory(), armnn::info, ProfilingService::Instance(), IRuntime::CreationOptions::m_DynamicBackendsPath, and IRuntime::CreationOptions::m_ProfilingOptions.
Referenced by Runtime::GetDeviceSpec().
~Runtime | ( | ) |
Definition at line 208 of file Runtime.cpp.
References DeviceSpec::ClearDynamicBackends(), DynamicBackendUtils::DeregisterDynamicBackends(), DeviceSpec::GetDynamicBackends(), and Runtime::UnloadNetwork().
Referenced by Runtime::GetDeviceSpec().
|
overridevirtual |
Evaluates a network using input in inputTensors and outputs filled into outputTensors.
Implements IRuntime.
Definition at line 271 of file Runtime.cpp.
References LoadedNetwork::EnqueueWorkload(), and LoadedNetwork::FreeWorkingMemory().
|
inlineoverridevirtual |
Implements IRuntime.
Definition at line 63 of file Runtime.hpp.
References Runtime::GetProfiler(), options, Runtime::RegisterDebugCallback(), Runtime::Runtime(), Runtime::RuntimeLoadedNetworksReserve, and Runtime::~Runtime().
Referenced by BOOST_AUTO_TEST_CASE().
|
overridevirtual |
Implements IRuntime.
Definition at line 260 of file Runtime.cpp.
References LoadedNetwork::GetInputTensorInfo().
|
overridevirtual |
Implements IRuntime.
Definition at line 265 of file Runtime.cpp.
References LoadedNetwork::GetOutputTensorInfo().
Gets the profiler corresponding to the given network id.
networkId | The id of the network for which to get the profile. |
Implements IRuntime.
Definition at line 143 of file Runtime.cpp.
Referenced by Runtime::GetDeviceSpec().
|
overridevirtual |
Loads a complete network into the Runtime.
[out] | networkIdOut | - Unique identifier for the network is returned in this reference. |
[in] | network | - Complete network to load into the Runtime. The runtime takes ownership of the network once passed in. |
Implements IRuntime.
Definition at line 47 of file Runtime.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
overridevirtual |
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. |
Implements IRuntime.
Definition at line 53 of file Runtime.cpp.
|
overridevirtual |
Implements IRuntime.
Definition at line 61 of file Runtime.cpp.
References armnn::Failure, ProfilingService::IncrementCounterValue(), ProfilingService::Instance(), LoadedNetwork::MakeLoadedNetwork(), and armnn::Success.
|
overridevirtual |
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. |
Implements IRuntime.
Definition at line 290 of file Runtime.cpp.
References DeviceSpec::AddSupportedBackends(), DynamicBackendUtils::CreateDynamicBackends(), DynamicBackendUtils::GetBackendPaths(), DynamicBackendUtils::GetSharedObjects(), LoadedNetwork::RegisterDebugCallback(), and DynamicBackendUtils::RegisterDynamicBackends().
Referenced by Runtime::GetDeviceSpec().
Unloads a network from the Runtime. 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(). |
Implements IRuntime.
Definition at line 105 of file Runtime.cpp.
References ARMNN_LOG, armnn::debug, armnn::Failure, ProfilingService::IncrementCounterValue(), ProfilingService::Instance(), armnn::Success, and armnn::warning.
Referenced by BOOST_AUTO_TEST_CASE(), and Runtime::~Runtime().
|
friend |
Definition at line 28 of file RuntimeTests.cpp.
Referenced by Runtime::GetDeviceSpec().