aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/armnn/IRuntime.hpp11
-rw-r--r--include/armnn/Types.hpp1
2 files changed, 11 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.
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp
index 0b7b941008..c3b439a2d9 100644
--- a/include/armnn/Types.hpp
+++ b/include/armnn/Types.hpp
@@ -265,6 +265,7 @@ public:
/// Type of identifiers for bindable layers (inputs, outputs).
using LayerBindingId = int;
+using ImportedInputId = unsigned int;
class PermutationVector
{