diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2022-06-30 17:13:04 +0100 |
---|---|---|
committer | Nikhil Raj <nikhil.raj@arm.com> | 2022-07-27 15:52:10 +0100 |
commit | 2d213a759e68f753ef4696e02a8535f7edfe421d (patch) | |
tree | f4003d0a60e907937e04d96fc434c0bfac596f86 /include/armnn/IWorkingMemHandle.hpp | |
parent | 28aa6691accfd78c5eb5c4356316220d0e82ddef (diff) | |
download | armnn-2d213a759e68f753ef4696e02a8535f7edfe421d.tar.gz |
IVGCVSW-6620 Update the async api to use ExecutionData
* ExecutionData holds a void* which can be assigned to data required
for execution in a backend. WorkingMemDescriptors are used in the Ref
backend which hold TensorHandles for inputs and outputs.
* Updated ExecuteAsync functions to take ExecutionData.
* Added CreateExecutionData and UpdateExectutionData to IBackendInternal.
* Streamlined experimental IWorkingMemHandle API by removing map related
function and unused m_workingMemDescriptorMap from WorkingMemHandle.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I54b0aab12872011743a141eb42dae200227769af
Diffstat (limited to 'include/armnn/IWorkingMemHandle.hpp')
-rw-r--r-- | include/armnn/IWorkingMemHandle.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/armnn/IWorkingMemHandle.hpp b/include/armnn/IWorkingMemHandle.hpp index bbc4913c59..62f71118eb 100644 --- a/include/armnn/IWorkingMemHandle.hpp +++ b/include/armnn/IWorkingMemHandle.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2021 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -13,6 +13,8 @@ using NetworkId = int; namespace experimental { +struct ExecutionData; + struct WorkingMemDescriptor; class IWorkingMemHandle @@ -33,12 +35,14 @@ public: /// IsAllocated returns true if the backing memory is currently allocated. virtual bool IsAllocated() = 0; - /// Get the WorkingMemDescriptor for a Layer. - virtual WorkingMemDescriptor& GetWorkingMemDescriptor(LayerGuid id) = 0; - /// Get the WorkingMemDescriptor at an index. The WorkingMemDescriptors are stored in the same order as /// the Workloads in a topologically sorted graph. virtual WorkingMemDescriptor& GetWorkingMemDescriptorAt(unsigned int id) = 0; + + /// Get the ExecutionData at an index. + /// The ExecutionData is paired with a BackendId to be able to call backend specific functions upon it. + /// The ExecutionData are stored in the same order as the Workloads in a topologically sorted graph. + virtual std::pair<BackendId, ExecutionData>& GetExecutionDataAt(unsigned int id) = 0; }; } // end experimental namespace |