|
25.02
|
#include <Runtime.hpp>
Public Member Functions | |
| Status | LoadNetwork (NetworkId &networkIdOut, IOptimizedNetworkPtr network) |
| Loads a complete network into the Runtime. 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) |
| armnn::TensorInfo | GetInputTensorInfo (NetworkId networkId, LayerBindingId layerId) const |
| armnn::TensorInfo | GetOutputTensorInfo (NetworkId networkId, LayerBindingId layerId) const |
| std::vector< ImportedInputId > | ImportInputs (NetworkId networkId, const InputTensors &inputTensors, MemorySource forceImportMemorySource) |
| std::vector< ImportedOutputId > | ImportOutputs (NetworkId networkId, const OutputTensors &outputTensors, MemorySource forceImportMemorySource) |
| void | ClearImportedInputs (NetworkId networkId, const std::vector< ImportedInputId > inputIds) |
| void | ClearImportedOutputs (NetworkId networkId, const std::vector< ImportedOutputId > outputIds) |
| Status | EnqueueWorkload (NetworkId networkId, const InputTensors &inputTensors, const OutputTensors &outputTensors, std::vector< ImportedInputId > preImportedInputIds={}, std::vector< ImportedOutputId > preImportedOutputIds={}) |
| Status | UnloadNetwork (NetworkId networkId) |
| Unloads a network from the Runtime. 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... | |
| RuntimeImpl (const IRuntime::CreationOptions &options) | |
| Creates a runtime for workload execution. More... | |
| ~RuntimeImpl () | |
| void | ReportStructure (arm::pipe::IProfilingService &profilingService) override |
| void | InitialiseProfilingService (arm::pipe::IProfilingService &profilingService) override |
Friends | |
| void | RuntimeLoadedNetworksReserve (RuntimeImpl *runtime) |
| arm::pipe::IProfilingService & | GetProfilingService (RuntimeImpl *runtime) |
Definition at line 30 of file Runtime.hpp.
| RuntimeImpl | ( | const IRuntime::CreationOptions & | options | ) |
Creates a runtime for workload execution.
Definition at line 295 of file Runtime.cpp.
References ARMNN_LOG, ARMNN_VERSION, armnn::BackendRegistryInstance(), DeviceSpec::ClearDynamicBackends(), arm::pipe::ConvertExternalProfilingOptions(), DynamicBackendUtils::DeregisterDynamicBackends(), armnn::DmaBufProtected, armnn::error, DeviceSpec::GetDynamicBackends(), BackendRegistry::GetFactory(), armnn::GetMemBlockStrategyTypeName(), armnn::GetMemoryOptimizerStrategy(), armnn::GetTimeNow(), armnn::HasMatchingCapability(), armnn::info, IRuntime::CreationOptions::m_BackendOptions, IRuntime::CreationOptions::m_CustomAllocatorMap, IRuntime::CreationOptions::m_DynamicBackendsPath, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::m_MemoryOptimizerStrategyMap, IRuntime::CreationOptions::m_ProfilingOptions, IRuntime::CreationOptions::m_ProtectedMode, IRuntime::CreationOptions::ExternalProfilingOptions::m_TimelineEnabled, armnn::ParseOptions(), BackendRegistry::RegisterAllocator(), BackendRegistry::RegisterMemoryOptimizerStrategy(), and armnn::warning.
| ~RuntimeImpl | ( | ) |
Definition at line 523 of file Runtime.cpp.
References ARMNN_LOG, armnn::BackendRegistryInstance(), DeviceSpec::ClearDynamicBackends(), DynamicBackendUtils::DeregisterDynamicBackends(), DeviceSpec::GetDynamicBackends(), armnn::GetTimeDuration(), armnn::GetTimeNow(), armnn::info, BackendRegistry::SetProfilingService(), and RuntimeImpl::UnloadNetwork().
| void ClearImportedInputs | ( | NetworkId | networkId, |
| const std::vector< ImportedInputId > | inputIds | ||
| ) |
Definition at line 610 of file Runtime.cpp.
References LoadedNetwork::ClearImportedInputs().
| void ClearImportedOutputs | ( | NetworkId | networkId, |
| const std::vector< ImportedOutputId > | outputIds | ||
| ) |
Definition at line 614 of file Runtime.cpp.
References LoadedNetwork::ClearImportedOutputs().
| Status EnqueueWorkload | ( | NetworkId | networkId, |
| const InputTensors & | inputTensors, | ||
| const OutputTensors & | outputTensors, | ||
| std::vector< ImportedInputId > | preImportedInputIds = {}, |
||
| std::vector< ImportedOutputId > | preImportedOutputIds = {} |
||
| ) |
Definition at line 619 of file Runtime.cpp.
References ARMNN_LOG, ARMNN_SCOPED_PROFILING_EVENT, LoadedNetwork::EnqueueWorkload(), armnn::error, armnn::Failure, LoadedNetwork::FreeWorkingMemory(), ProfilerManager::GetInstance(), LoadedNetwork::GetProfiler(), armnn::GetTimeDuration(), armnn::GetTimeNow(), armnn::info, ProfilerManager::RegisterProfiler(), and armnn::Undefined.
|
inline |
Definition at line 80 of file Runtime.hpp.
| TensorInfo GetInputTensorInfo | ( | NetworkId | networkId, |
| LayerBindingId | layerId | ||
| ) | const |
Definition at line 588 of file Runtime.cpp.
References LoadedNetwork::GetInputTensorInfo().
| TensorInfo GetOutputTensorInfo | ( | NetworkId | networkId, |
| LayerBindingId | layerId | ||
| ) | const |
Definition at line 593 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. |
Definition at line 262 of file Runtime.cpp.
| std::vector< ImportedInputId > ImportInputs | ( | NetworkId | networkId, |
| const InputTensors & | inputTensors, | ||
| MemorySource | forceImportMemorySource | ||
| ) |
Definition at line 598 of file Runtime.cpp.
References LoadedNetwork::ImportInputs().
| std::vector< ImportedOutputId > ImportOutputs | ( | NetworkId | networkId, |
| const OutputTensors & | outputTensors, | ||
| MemorySource | forceImportMemorySource | ||
| ) |
Definition at line 604 of file Runtime.cpp.
References LoadedNetwork::ImportOutputs().
|
override |
Definition at line 289 of file Runtime.cpp.
References ArmNNProfilingServiceInitialiser::InitialiseProfilingService().
| Status LoadNetwork | ( | NetworkId & | networkIdOut, |
| IOptimizedNetworkPtr | network | ||
| ) |
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. |
Definition at line 139 of file Runtime.cpp.
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 145 of file Runtime.cpp.
References RuntimeImpl::LoadNetwork(), and armnn::Undefined.
| Status LoadNetwork | ( | NetworkId & | networkIdOut, |
| IOptimizedNetworkPtr | network, | ||
| std::string & | errorMessage, | ||
| const INetworkProperties & | networkProperties | ||
| ) |
Definition at line 153 of file Runtime.cpp.
References armnn::Failure, ProfilerManager::GetInstance(), LoadedNetwork::MakeLoadedNetwork(), ProfilerManager::RegisterProfiler(), and armnn::Success.
| 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 665 of file Runtime.cpp.
References LoadedNetwork::RegisterDebugCallback().
|
override |
Definition at line 274 of file Runtime.cpp.
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(). |
Definition at line 204 of file Runtime.cpp.
References ARMNN_LOG, armnn::debug, armnn::Failure, ProfilerManager::GetInstance(), ProfilerManager::RegisterProfiler(), armnn::Success, and armnn::warning.
Referenced by RuntimeImpl::~RuntimeImpl().
|
friend |
Definition at line 59 of file TestUtils.cpp.
|
friend |