From d7ceec59ce45f690deba2c0d452ec91fabbdadf9 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Wed, 6 Jul 2022 12:09:05 +0100 Subject: IVGCVSW-6896 Fix pre-import when using sync execute. * Refactor backend capability checks in LoadedNetwork. * ImportInputs should check the number of tensors does not exceed the number of inputs. * In EnqueueWorkload the check for for the count of input tensors was ignoring pre-imported inputs. * Added checks to verify ImportInputs/ImportOutputs worked as expected in EndToEndTestImpl. * Improve documentation on ImportInputs/ImportOutputs in IRuntime.hpp. * Disabled import tests in CL and Neon EndToEndTests that cannot work. Signed-off-by: Colm Donelan Change-Id: Iae4b2644a1c9f01ee72bce1afb211661cc9ae2e3 --- include/armnn/IRuntime.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/armnn') diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp index 0a2dc3233e..9ea9ac83dc 100644 --- a/include/armnn/IRuntime.hpp +++ b/include/armnn/IRuntime.hpp @@ -221,14 +221,18 @@ public: /// 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 and aligned memory import + /// No exceptions are thrown for failed imports. It is the caller's responsibility to check whether + /// tensors have been successfully imported by comparing returned ids with those passed in the InputTensors. + /// Whether a tensor can be imported or not is backend specific. std::vector 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 and aligned memory import + /// No exceptions are thrown for failed imports. It is the caller's responsibility to check whether + /// tensors have been successfully imported by comparing returned ids with those passed in the OutputTensors. + /// Whether a tensor can be imported or not is backend specific. std::vector ImportOutputs(NetworkId networkId, const OutputTensors& outputTensors, MemorySource forceImportMemorySource = MemorySource::Undefined); -- cgit v1.2.1