aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-08-24IVGCVSW-6216 PCA: Documentation Updatesv21.08branches/armnn_21_08David Monahan
* Added the UseCustomMemoryAllocator interface to the Backend Developer Guide * Added the GetCapabilities interface to the Backend Developer Guide Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I26e96ec1b3fe74b52c770269f3f79e688d196667
2021-08-20IVGCVSW-6294 Detect and remove extraneous fp16 conversion layersJan Eilers
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I69a6ceda0d3e8d39947df71a2ad0d365ac7767d8 Signed-off-by: Finn Williams <Finn.Williams@arm.com>
2021-08-17IVGCVSW-6119: Restore FullyConnectedDescriptor::GetNumViews for backward ↵Francis Murtagh
compatibility * Deprecate publicly visible API and forward to new function name Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I25fe8a303b50ecb478abd35ca034ad09bd737fe4
2021-08-17IVGCVSW-6317 Cleaning up BackendRegistry following negative tests.Colm Donelan
* Deregister backends in BackendHintTest. * Deregister backend in ThrowBackendUnavailableException * Clean up dynamic backends when an exception is thrown from RuntimeImpl::RuntimeImpl. * Use CHECK_THROWS_AS_MESSAGE syntax in ClCustomAllocatorTests. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I0e6e5413dd074b5fcfc9515c85cb8d40a4a0b73c
2021-08-16Bugfix: Only run ClCustomAllocatorCpuAccNegativeTest if Neon EnabledFrancis Murtagh
* Also call DeregisterAllocator on CpuAcc backend. * Removed problematic ClCustomAllocatorGpuAccNullptrTest unit test. Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ia2894c82a2b5de1c8d662551ea07b9123dd682cb
2021-08-16IVGCVSW-6076 PCA: Add support for Importing Protected DMA buffersFrancis Murtagh
* Add DmaBufProtected support to ClImportTensorHandle::Import() * Add DmaBufProtected to Map/Unmap switch case in ClBackend * Remove unreachable return statement Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I5918f6235af74ae287b8a73744a8cc979a07b0bf
2021-08-13IVGCVSW-6291 'Issue parsing profiling layer details'Sadik Armagan
* Initialized the new variable. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I3d86d43455dd2df4246d76a2ac7cb49d8a48b786
2021-08-13Fixed logic error.Mike Kelly
* Condition used to check if m_BiasTensorInfo had a value then obtain a value from m_WeightsTensorInfo Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I1b68ed98baa54a20663728b8871dcfa35c3347f0
2021-08-12IVGCVSW-6078 Add support for Dma_buf CustomMemoryAllocatorDavid Monahan
* Updated supported sources in ICustomAllocator * Added MemorySource to the overridden MemoryRegion in ClBackend * Added switch statements to handle mapping/unmapping of differing memory sources * Added Import handler to map allocated DmaBuf memory Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I2125f6f6fe72363d87ead62e211fc45e4fa28b3f
2021-08-12IVGCVSW-6077 Add Custom Allocator testsFrancis Murtagh
* Add test for invalid backend and nullptr * Small refactor * Throw exception on nullptr allocator instead of assert Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I94ce4f61d7cb3123831f1acd98165ae14c40033a
2021-08-11IVGCVSW-6297 'Issue with Profiling output'Sadik Armagan
* Added missing comma to output. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I10dde7666ea1e6ea7ebe5bd497d18fc838cb9812
2021-08-11IVGCVSW-6087 Add an Assertion check to make sure we aren't given null allocatorsDavid Monahan
Add conditional compilation check to Cl specific header Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ib196b8ef4dc5fcfd1d1ccd3f29abf8e0ecd020cb
2021-08-10MLCE-530 Add support for UnidirectionalSequenceLstm to RefWorkloadexperimental/daves_custom_allocator_dmabufNarumol Prangnawarat
* Add implementation of IsUnidirectionalSequenceLstmSupported to RefLayerSupport * Add RefUnidirectionalSequenceLstmWorkload * Refactor Lstm to be able to use for Lstm and SequenceLstm * Unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ibc066d213213a11b955dfefbe518de643298ba0c
2021-08-10Adds CustomAllocator interface and Sample AppJan Eilers
* Updates the runtime options with a CustomAllocatorMap which allows to define a CustomAllocator for specific backends * Change IBackendInternal interface to use a shared pointer to a custom allocator * Update ClBackend.hpp/cpp to use the CustomAllocator * Adds an example application and unit test which uses a CustomAllocator for GpuAcc * Refactor of the interface to use MemorySource instead of the user Mapping cl_mem directly * Modify the BackendRegistry to also hold a registry of CustomAllocators * BackendRegistry Deregister will also deregister any allocators associated with that backend id * set_global_allocator within the BaseMemoryManager so that it always matches the currently used allocator Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I156d819686021865f4375e6cb7a5c5dec8fee9e8 Signed-off-by: David Monahan <david.monahan@arm.com>
2021-08-10IVGCVSW-6292 Allow profiling details to be switched off during profilingKeith Davis
* Add switch for network details during profiling Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I8bd49fd58f0e0255598106e9ab36806ee78391d6
2021-08-10IVGCVSW-6249 Add ProfilingDetails Macros to all workloads in CLKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I92dd410da7ad633a46d025fdc2b26093041c439b
2021-08-10IVGCVSW-6249 Add ProfilingDetails Macros to all workloads in NeonKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I7be77712a9f790928219ce91222d46cc766ab9dd
2021-08-10IVGCVSW-6289 Separate tensor shape inference and validation callsFinn Williams
* Pass m_shapeInferenceMethod to OptimizerOptions in ExecuteNetwork Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I90280fb7629092d3b66e8a3968ca9e35a0df854a
2021-08-09IVGCVSW-6119 ConstTensorsAsInput: FullyConnected Bug FixMatthew Sloyan
* Updated FullyConnected layer member variables when cloning as some backends still require them. * Added SetConstant call when using deprecated AddFullyConnectedLayer method to ensure backwards compatibility. * Added SetConstant to SimpleSample to ensure it runs on all backends. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ie7b4e4b868f23f8fcf9c41ffd12e2ea9ea53afca
2021-08-06Replace use of non-standard variable length arraysRob Hughes
Replace these with a std::vector for portability Change-Id: Ia6b0dc9360446ef8bba0baa88c61b4c400fcd799 Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2021-08-06Infer tensor shapes before graph optimizationFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I2a7a9b7b21848e2b3258788f06b01159f95a0d6c
2021-08-06IVGCVSW-6119 ConstTensorsAsInput: FullyConnectedMatthew Sloyan
* Constant weights and biases are now stored as Constant layers. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Updated Schema with IsConstant and ConstantTensorsAsInputs. * Updated Ref backend to handle constant weights and bias as inputs rather than reading from member variables. * Added dynamic or constant input EndToEnd tests. !android-nn-driver:5959 Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ibf3cf437df1100e4b322b0d303c575c6339f9696
2021-08-05IVGCVSW-6258 'Unittest failures'Sadik Armagan
* Fixed unit test failures happening on threads. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I2a6048f75ece4a9f4c2116306838ff55385aabe7
2021-08-05Fix for gcc 9.3.0 compiler warningJim Flynn
Change-Id: I6368925a19ee11d67b1b153cf1e7dc64eca11077 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2021-08-05IVGCVSW-5980 Add Descriptor, TensorInfo and Convolution algorithm to JSONKeith Davis
* Add GUID as field to layer details and profiling events * Add Optional GUID param to existing tests * Improve Details macro to be inline function * Fix some formatting Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I66f192a90a7642b3ee8e7dda0d3f428cce002581
2021-08-04Fixed bugs in PreCompiledLayerMike Kelly
* Fixed PreCompiledObject type (was const void** instead of void*) * Fixed bug where a new shared_ptr was being created instead of allowing std::move to convert the unique_ptr into a shared_ptr. * Improved tests to ensure that the original pointer is maintained. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I3f50d51775ee0180c894c2843ed7bc990a771dea
2021-08-04IVGCVSW-5980 JSON profiling outputKeith Davis
* Add new ProfilingDetails class to construct operator details string * Add new macro which helps append layer details to ostream * Add ProfilingEnabled to NetworkProperties so that profiling can be realised when loading the network * Add further optional info to WorkloadInfo specific to convolutions * Generalise some JsonPrinter functions into JsonUtils for reusability * Remove explicit enabling of profiling within InferenceModel as it is done when loading network * Add ProfilingDetails macros to ConvolutionWorkloads for validation Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Ie84bc7dc667e72e6bcb635544f9ead7af1765690
2021-07-29Fix use of non-standard datatypesRob Hughes
Change-Id: I03ef0571b24ad2bddfabf3bc5b11b614e7d7c8b4 Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2021-07-28MLCE-530 Add Serializer and Deserializer for UnidirectionalSequenceLstmNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ic1c56a57941ebede19ab8b9032e7f9df1221be7a
2021-07-27IVGCVSW-6011 Update Mali to r30p0 on debian hikeysFrancis Murtagh
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I977a75b403a879603f0291a58be21a227201a273
2021-07-26IVGCVSW-5966 'Update all the documentation'Sadik Armagan
* Update all documentation for removing BOOST library dependency Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ie21ff096a11b7a623b1b9bb6f71eb63ea6e7b615
2021-07-22MLCE-530 Add front end support for UnidirectionalSequenceLstm on ArmNNNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I57bcbdec3eb0155f41af0fe7d6abf9bac2ec86eb
2021-07-22IVGCVSW-6073 Add protected mode to ArmNN CreationOptionsJan Eilers
* Adds logic to the Runtime to activate protected mode * Adds ProtectedContentAllocation backend capability to ClBackend It's not fully activated yet because the CustomAllocator is missing. Will print an error message and won't register the backend but won't fail. * Extends IBackendInternal with an UseCustomAllocator function. * Adds related unit tests Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I64f465c5800eb104aa90db1bbf772a4148b5072f
2021-07-21IVGCVSW-6176 Add support for shape_signature in the tflite parserFinn Williams
* tflite shape_signatures will now be the preferred way to detect dynamic tensors * add test utility to the parser that converts a model's tensors to dynamic * by default tests will run a dynamic version of the model in addition to the original * fix dynamic shape inference of unpack operator * reactivate and fix quantize test * add shape inference to expand dims Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: If11ba19d813cd3590707583dff1e4eb0e6412a1d
2021-07-21NNXSW-3081 Move Filesystem.hpp and Threads.hpp to public includeRob Hughes
!android-nn-driver:5966 Change-Id: Ice0b4d2872bb0e09bfc0763034a206c3a8f24af4 Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2021-07-21Fixed RunTest's TfliteParser with boolean outputBruno Goncalves
Tests for TfLiteParser are not working when the expected outputs have boolean type Signed-off-by: Bruno Goncalves <bruno.slackware@gmail.com> Change-Id: I16890f82e8e581f53e6e8464668c5adf3374bf2f
2021-07-21Added comparison operators to TfLiteParserBruno Goncalves
E.g. Equal, NotEqual, Greater, GreaterOrEqual, Less and LessOrEqual Signed-off-by: Bruno Goncalves <bruno.slackware@gmail.com> Change-Id: Id56ef3cc19cc5c5daa19354010c9f25766e5fd00
2021-07-16Avoid empty test suitesMatthew Bentham
Refactor code around conditionally-compiled tests to avoid declaring empty test suites, as this can cause unused function warnings to be issued under certain combinations of compiler, warning level, and doctest version. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: Ib501aef80475538a725b857d9c31d1d2f96b124d
2021-07-16Fix binding of reference to null pointer in RefFullyConnectedWorkloadMatthew Bentham
As the bias decoder is optional, pass it as a pointer to the FullyConnected function instead of by reference. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I0bd2e601015e7fa1ae21b50f6c3dd7eac4176554
2021-07-16Avoid undefined behaviour in NumericCast unit testMatthew Bentham
Because the maximum value of an int32_t isn't exactly representable by a 32-bit float, casting it to a float produces a greater value, and then casting that back to an int32_t is undefined. (In tested implementations the cast saturates, so accidentally the correct result is returned). Using double for the intermediate value instead gives a high enough precision that this test case can be safely expressed. Silences warning from Undefioned Behaviour Sanitiser. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I6fe3e89cb6ac695049c92f3b75aca0c14d0e14aa
2021-07-15Fix some compile warnings & errorsRob Hughes
* Fix type of literals * Add explicit casts * #include missing headers * Replace use of non-standard u_int8_t * Remove name of unused variables * Fix DLL export macro - this was broken when some of the exporting headers were moved to a different library. Change-Id: Ie569c8df41a077b46c608798f39526352e2aeb3a Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2021-07-12Fix Unittest failures in CL MasterNikhil Raj
* This change is caused by ACL patch: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5855 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I222ff6dea155be38899145a5d096093db1b5e716
2021-07-05Remove excess trace messages from unit testsMatthew Bentham
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I5889a5f44c0c22da6421d9bd06494c75d74e0440
2021-07-05Improve ThrowBackendUnavailableException testMatthew Bentham
Fail test if exception is not thrown. Remove unnecessary references to CpuAcc backend. Remove excess trace message. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I22d30b47a092ac2e66f5987c656804cd31b04b21
2021-07-01IVGCVSW-6075 Add ParseExpandDims to TfliteParserTeresa Charlin
* Add ExpandDims tests in tfliteparser * Add support for negative axis to squeeze Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I604c9b4ac6514895e9e3d4d85c2937e797d288e0
2021-06-30IVGCVSW-6161 ConstTensorsAsInput: Optimizer - Redirect ConstTensor layer membersMatthew Sloyan
* Optimization that searches for layers with ConstantLayers as inputs. * The layer member variables are then redirected to these ConstantLayers. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I24a2bf0e8575b808343e0bbe3897b344e94796ad
2021-06-30IVGCVSW-6114 Create multiple LoadedNetworks from one OptimizedNetworkMike Kelly
* Added IOptimizedNetwork constructor that takes another IOptimizedNetwork and a ModelOptions. * Changed PreCompiledLayer to use shared_ptr rather than unique_ptr to store the PreCompiledObject (no interface changes). * Added unit tests to ensure that PreCompiledLayer::Clone() clones the pointer to the PreCompiledObject correctly. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I3ef56055e0d189ffce9e651882d34da16c70a240
2021-06-29Fix segfault in IsLayerSupportedTestsMatthew Bentham
DummyLayer<> was not implemented for QLstmLayer, so the default implementation was getting called. This caused null weights to be dereferenced in WorkloadFactory during IsLayerSupportedTests. While this would often not cause a crash, it could be reliably detected by running the UnitTests with Undefined Behavior Sanitizer. Change-Id: I7a49b18b8292632436b0aae52d6607e28fdd1839 Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
2021-06-29IVGCVSW-6027 Add IsConstant flag to TensorInfoJan Eilers
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I7cb0a6a8856d8cd9949bec83c1ddce0a454fdf63
2021-06-24Disable Sin support in NeonNikhil Raj
* Disabling until ACL fixes COMPMID-4586 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Icabfa20062561201b6d7f850443a7eb2fad64e7b