aboutsummaryrefslogtreecommitdiff
path: root/ConversionUtils.cpp
AgeCommit message (Collapse)Author
2022-12-13Optimize the calling of IsLayerSupported().Cathal Corbett
!armnn:8742 * Done as part of 22.11/23.02 innovation days. * IsLayerSupported() is called in model prepare (delegate, android-nn-driver and shim/support_library) and again in ArmNN once model optimization is performed. * From calling IsLayerSupported() the first time, we should know that the layers are supported and what backend they are supported on. * Solution is to set the BackendId of the IConnectableLayer when IsLayerSupported() is called the first time, * In the Optimize() function we then check if the backend is set. If so, we do not call IsLayerSupported() again. * In the case a layer that is supported gets optimized, then the BackendId of that layer get set to "Unknown" for the new optimized layer and IsLayerSupported() will get called on the newly optimized layer. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ie5c6c9cd10d81f90b1ee78dd6e3442f353b6c109
2022-05-09IVGCVSW-6127 Fixing seg fault in LayerInputHandleColm Donelan
* Fixing a segmentation fault when SanitizeQuantizationScale is called on a LayerInputHandle whose m_OutputSlot is nullptr. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I447c405086ff327a28a72938fbf82844d715a17d
2022-05-05IVGCVSW-6127 ConstTensorsAsInput: DepthwiseConvolution2dCathal Corbett
!armnn:7417 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ic37d6b8677e040c60a90358dd0a4a8eb33fb6ea0
2021-10-14IVGCVSW-6428 Remove assertsMike Kelly
* Changed asserts to check for errors and return appropriate values or throw exceptions * Changed unit tests to use Doctest's long macro names as the short macro names clashed with Android's Logging macros * Removed unused #includes * Clarified ambiguous #includes Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ice92a37590df727fd581d3be5ff2716665f26a13
2021-05-13IVGCVSW-6015 Fix uninitialised m_Optional field in ConstTensorPinJim Flynn
Change-Id: I4e3144cafad370866325cda668bfc389455f1d44 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2021-04-19IVGCVSW-5826 Remove cross-wireing in depthwiseJan Eilers
* The permutation of the tensor info is now completely handled in the armnnUtils::Permuted function. That includes quantization informations too !armnn:5411 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I40410141303d950be7888f9e491133251b6f69d8
2021-03-30IVGCVSW-5766 Avoiding driver abort when Cts tests use invalid filter shape.Colm Donelan
* A number of DepthwiseConv2d Cts tests pass a filter operand with a dimension[0] value greater than 1 in contravention of Android documentation. Adding a check to handle this gracefully. * Changing a hard assert in ConversionUtils::ConstTensorPin to a warning. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I605340d098b717d1d88d259a0ed89a801287764d
2020-08-12IVGCVSW-4931 Update NN Driver to support dynamic tensorsFinn Williams
* Change NN Driver m_Network to now have ShapeInferenceMethod::InferAndValidate * Implement dynamic tensor support for: - ArgMinMax layer - Pooling2d layer - Activation layer * Skip dynamic tensor tests for any HAL other than 1.3 Change-Id: Icf66c968e49cdd4822b8c79c5f18b3f9e97dc53f Signed-off-by: Finn Williams <Finn.Williams@Arm.com> Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
2020-04-07IVGCVSW-4485 Remove Boost assertNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: If602024a339df7548333e470545f9400c3daf7b3
2020-03-11IVGCVSW-4482 Remove boost::ignore_unusedJan Eilers
* replaced boost::ignore_unused with armnn::IgnoreUnused Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I4443a3620ed7d51b151af67c070d4225e410b5fa
2020-02-28IVGCVSW-4375 Add driver support for TransposeMike Kelly
* Changed ConvertTranspose to use Transpose instead of Permute * Removed unused code related to permutation !armnn:2787 Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ie59ca80203109bd6bb2abcdedc5ac53c2b2eb157
2019-07-16IVGCVSW-3477 Refactor android-nn-driver to use armnn ILayerSupportedFerran Balaguer
!armnn:1508 Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: Ica5fcb683f101bde9e651f0be0f5b9b4c409d1aa
2019-04-04IVGCVSW-2886 Support multiple backends in Android driverNattapat Chaimanowong
Change-Id: I4abe1f750801911570b6dc65c187b828c5929b5f Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com>
2018-09-18IVGCVSW-1806: Refactor Android-NN-Driver ModelToINetworkConverterarovir01
* Moved conversion logic into new V1_0 and V1_1 HalPolicy classes * Extracted common helper functions into ConversionUtils class Change-Id: I1ab50edc266dd528c0cb22a5cd1aa65e103674d9