From 55a8ffda24fff5515803df10fb4863d46a1effdf Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Wed, 7 Apr 2021 20:10:49 +0100 Subject: IVGCVSW-5823 Refactor Async Network API * Moved IAsyncNetwork into IRuntime. * All LoadedNetworks can be executed Asynchronously. Signed-off-by: Mike Kelly Change-Id: Ibbc901ab9110dc2f881425b75489bccf9ad54169 --- src/armnn/Runtime.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/armnn/Runtime.hpp') 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 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 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 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. -- cgit v1.2.1