diff options
author | Mike Kelly <mike.kelly@arm.com> | 2021-04-07 20:10:49 +0100 |
---|---|---|
committer | finn.williams <finn.williams@arm.com> | 2021-04-08 11:23:47 +0000 |
commit | 55a8ffda24fff5515803df10fb4863d46a1effdf (patch) | |
tree | e314dea48f22ae88d452527b2decaca61df108ad /src/armnn/Runtime.hpp | |
parent | b76eaed55a89330b3b448c4f4522b3fc94a4f38d (diff) | |
download | armnn-55a8ffda24fff5515803df10fb4863d46a1effdf.tar.gz |
IVGCVSW-5823 Refactor Async Network API
* Moved IAsyncNetwork into IRuntime.
* All LoadedNetworks can be executed Asynchronously.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: Ibbc901ab9110dc2f881425b75489bccf9ad54169
Diffstat (limited to 'src/armnn/Runtime.hpp')
-rw-r--r-- | src/armnn/Runtime.hpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/armnn/Runtime.hpp b/src/armnn/Runtime.hpp index 150012eb61..da5445383f 100644 --- a/src/armnn/Runtime.hpp +++ b/src/armnn/Runtime.hpp @@ -4,7 +4,6 @@ // #pragma once -#include "AsyncNetwork.hpp" #include "LoadedNetwork.hpp" #include "DeviceSpec.hpp" @@ -56,17 +55,14 @@ public: TensorInfo GetInputTensorInfo(NetworkId networkId, LayerBindingId layerId) const; TensorInfo GetOutputTensorInfo(NetworkId networkId, LayerBindingId layerId) const; - // Create Aysnchronous Network from the IOptimizedNetowrkPtr - std::unique_ptr<IAsyncNetwork> CreateAsyncNetwork(NetworkId& networkIdOut, - IOptimizedNetworkPtr network, - std::string& errorMessage, - const INetworkProperties& networkProperties); - - // Evaluates network using input in inputTensors, outputs filled into outputTensors. Status EnqueueWorkload(NetworkId networkId, - const InputTensors& inputTensors, - const OutputTensors& outputTensors); + const InputTensors& inputTensors, + const OutputTensors& outputTensors); + + Status Execute(IWorkingMemHandle& workingMemHandle, + const InputTensors& inputTensors, + const OutputTensors& outputTensors); /// Unloads a network from the Runtime. /// At the moment this only removes the network from the m_Impl->m_Network. @@ -82,6 +78,10 @@ public: /// @return A pointer to the requested profiler, or nullptr if not found. const std::shared_ptr<IProfiler> GetProfiler(NetworkId networkId) const; + /// Create a new unique WorkingMemHandle object. Create multiple handles if you wish to have + /// overlapped Execution by calling this function from different threads. + std::unique_ptr<IWorkingMemHandle> CreateWorkingMemHandle(NetworkId networkId); + /// Registers a callback function to debug layers performing custom computations on intermediate tensors. /// @param networkId The id of the network to register the callback. /// @param func callback function to pass to the debug layer. |