aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2022-01-28 17:59:18 +0000
committerJim Flynn <jim.flynn@arm.com>2022-01-31 12:53:51 +0000
commite2af6f4322a1e2b8b3c391fb721a6a80c281477f (patch)
treeb0dd53289e27304a6d724821459cb0f4b6343a39 /include
parentfd313fef775ed210f8dab84452ea382a0b4164b0 (diff)
downloadarmnn-e2af6f4322a1e2b8b3c391fb721a6a80c281477f.tar.gz
IVGCVSW-6552 Add support of aligned host memory
* Add AllocatedData functions to OutputHandler * Enable import aligned memory in ImportInputs * Enable import aligned memory in ImportOutputs * Allow to import input and output if the memory is aligned * Implement Reconfigure function on ClConvolution2dWorkload * End-to-end test on Ref and Cl to ensure that input and output memory are imported when aligned Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I9e5e4c26d1ac2f1d806803ade5f64c6479c51718
Diffstat (limited to 'include')
-rw-r--r--include/armnn/IRuntime.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index d85a3e3724..042271fc2b 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -216,18 +216,19 @@ 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);
+ /// Only compatible with AsyncEnabled networks and aligned memory import
+ std::vector<ImportedInputId> ImportInputs(NetworkId networkId, const InputTensors& inputTensors,
+ MemorySource forceImportMemorySource = MemorySource::Undefined);
/// ImportOutputs separates the importing and mapping of OutputTensors from network execution.
/// Allowing for a set of OutputTensors 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<ImportedOutputId> ImportOutputs(NetworkId networkId, const OutputTensors& outputTensors);
+ /// Only compatible with AsyncEnabled networks and aligned memory import
+ std::vector<ImportedOutputId> ImportOutputs(NetworkId networkId, const OutputTensors& outputTensors,
+ MemorySource forceImportMemorySource = MemorySource::Undefined);
/// Un-import and delete the imported InputTensor/s
/// This function is not thread safe and must not be used while other threads are calling Execute().
@@ -242,7 +243,9 @@ public:
/// Evaluates a network using input in inputTensors and outputs filled into outputTensors
Status EnqueueWorkload(NetworkId networkId,
const InputTensors& inputTensors,
- const OutputTensors& outputTensors);
+ const OutputTensors& outputTensors,
+ std::vector<ImportedInputId> preImportedInputIds = {},
+ std::vector<ImportedOutputId> preImportedOutputIds = {});
/// This is an experimental function.
/// Evaluates a network using input in inputTensors and outputs filled into outputTensors.