aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/RefTensorHandle.cpp
AgeCommit message (Collapse)Author
2024-02-21IVGCVSW-7854 Remove/rewrite asserts in the backends.Colm Donelan
* Identify usages of ARMNN_ASSERT that should be proper exceptions. * Change ARMNN_ASSERT in Doctests to CHECK. * Verify any remaining assertions are reasonable. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Ifd1f2a5a4bb60135e8654305035ec70e09c4dc2d
2023-09-08IVGCVSW-7901 Fix unsafe Usages of Memcpy in ArmnnDavid Monahan
* Updated usages of Memcpy to use proper checks for null instead of asserts * Added error checking in places where none existed Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I9529acd966466ba281f88918be2ec372a756e183
2023-07-14IVGCVSW-7830 Add backend optimizations to remove Reshapes where possibleMike Kelly
* Added optimization to remove reshapes for Neon and Ref Backends by using overridden TensorInfos * Added ability to delete Subgraphs during Optimization * Fixed naming error in NeonEndToEndTests and CLEndToEndTests * Added LayerNameAndTypeCheck for testing. * Fixed error where layers were not marked as altered when removed in CLBackend Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I1ac25cd4ec9821470d961831ae2c8d24882276cc
2022-12-15Change the semantics of RefTensorHandle::Import to 'overlay' existing memoryMatthew Bentham
This makes it possible to call Import on an Allocated() or memory-managed Tensor, which is needed for the current implementation of OptimizerOptions::m_ExportEnabled to work (as the last layer before the OutputLayer needs to be able to Import the user's OutputTensor, but this is done after other memory allocation). Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I1a885c2da7b1f0f3964ae53b8135b5e96a66614f
2022-12-14Refactor: Remove m_ImportFlags from RefTensorHandleMatthew Bentham
The import flags for a RefTensorHandle shouldn't be a data member, as RefTensorHandle can only import from MemorySource::Malloc. Instead, use m_ImportEnabled to determine what to return from GetImportFlags(). Simplifies the code in Import and CanBeImported. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: Ic629858920f7dd32f99ee27f150b81d8b67144cf
2022-02-08IVGCVSW-6700 Fix segfaultDavid Monahan
* Update how we are setting the m_InputWorkloadSlotPairs to properly identify inputs Signed-off-by: David Monahan <David.Monahan@arm.com> Change-Id: I6d36f6d2bfdd42ade22c34e215f0d18b02702207
2022-02-07IVGCVSW-6698 EndToEnd tests on ref to ensure allocated data can be reusedDavid Monahan
Signed-off-by: David Monahan <David.Monahan@arm.com> Change-Id: I2cda579d18be765fbc2783d9fd80ff8e5372a8a8
2022-01-17IVGCVSW-6672 Implement CanBeImported function to RefTensorHandleNikhil Raj
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Icaa3aa7ef3e5cc3984941d095edfe8f0b2137879
2021-11-08IVGCVSW-6527 Support the new memory API in loaded networkFinn Williams
* enable external memory management for neon and ref backends * change m_TensorMemoryVector to hold shared pointers * change input layer backend Id to match backend id of connected layer Signed-off-by: Finn Williams <finn.williams@arm.com> Change-Id: I2216a724028312eb101b290df3f224177826b1a0
2020-06-30IVGCVSW-5036 Do not allocate memory when import is enabledNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ideaae5280702aae6c73f3b4e4cee9f71a8386fda
2020-04-06IVGCVSW-4485 Remove Boost assertNarumol Prangnawarat
* Change boost assert to armnn assert * Change include file to armnn assert * Fix ARMNN_ASSERT_MSG issue with multiple conditions * Change BOOST_ASSERT to BOOST_TEST where appropriate * Remove unused include statements Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff
2019-09-16IVGCVSW-3858 Fix RefTensorHandleTests on Raspberry PiAron Virginas-Tar
* Fix alignment check to use sizeof(size_t) instead of a hard-coded value Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I092c4464c6cecb2403da9b7744b68ad063ddbad1
2019-08-22IVGCVSW-3670 Fix Vts Tests after adding Ref Import functionalityFerran Balaguer
Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: I87d003ae14575d7d7be67b2a7d00d69ef6201849
2019-08-20IVGCVSW-3606 Support memory import for Reference backendFerran Balaguer
Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: I94bd191f88e0911ad4e4727610e81cd7afa95512
2019-07-04IVGCVSW-3307 Add RefMemoryManagerMatthew Bentham
Simple pool memory manager for use in the reference backend, in order to make the backend usable for testing large networks. Change-Id: I5694da29052c60f95b57da595c64cc114d75b8ba Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
2019-07-02IVGCVSW-3307 Introduce RefTensorHandleMatthew Bentham
Use it for intermediate tensors on reference backend. Lays the groundwork for memory management in the reference backend. Change-Id: I7d3ee132cac31bde70ae6e1b815f4f0b03d550a6 Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>