diff options
author | Finn Williams <Finn.Williams@arm.com> | 2021-09-01 18:06:04 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2021-09-15 11:23:05 +0000 |
commit | f37b970ff96b98310309e78aeea8a2e9df27b15a (patch) | |
tree | 73f1e3db6552649ac57901fd3df7fadc9742385e /include/armnn/IRuntime.hpp | |
parent | fc8d434bb318aebb433a2f6d8ce9c066cd9c1b1e (diff) | |
download | armnn-f37b970ff96b98310309e78aeea8a2e9df27b15a.tar.gz |
IVGCVSW-6312 Support pre-importing inputs
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: Ifc5e6f2e36767cb2a5cbf281d40ec9989b581abc
Diffstat (limited to 'include/armnn/IRuntime.hpp')
-rw-r--r-- | include/armnn/IRuntime.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp index 345cdeb10a..908fe7692d 100644 --- a/include/armnn/IRuntime.hpp +++ b/include/armnn/IRuntime.hpp @@ -221,6 +221,14 @@ public: TensorInfo GetInputTensorInfo(NetworkId networkId, LayerBindingId layerId) const; TensorInfo GetOutputTensorInfo(NetworkId networkId, LayerBindingId layerId) const; + + /// ImportInputs separates the importing and mapping of InputTensors from network execution. + /// Allowing for a set of InputTensors to be imported and mapped once, but used in execution many times. + /// This function is not thread safe and must not be used while other threads are calling Execute(). + /// Only compatible with AsyncEnabled networks + std::vector<ImportedInputId> ImportInputs(NetworkId networkId, const InputTensors& inputTensors); + + /// Evaluates a network using input in inputTensors and outputs filled into outputTensors Status EnqueueWorkload(NetworkId networkId, const InputTensors& inputTensors, @@ -232,7 +240,8 @@ public: /// Will block until this and any other thread using the same workingMem object completes. Status Execute(IWorkingMemHandle& workingMemHandle, const InputTensors& inputTensors, - const OutputTensors& outputTensors); + const OutputTensors& outputTensors, + std::vector<ImportedInputId> preImportedInputs = {}); /// Unloads a network from the IRuntime. /// At the moment this only removes the network from the m_Impl->m_Network. |