aboutsummaryrefslogtreecommitdiff
path: root/ConversionUtils.hpp
AgeCommit message (Collapse)Author
2021-01-28IVGCVSW-4874 Provide LayerSupportHandle to frontend usersFrancis Murtagh
* Update to use dot operator for IsXXXLayerSupported() * Call LayerSupportHandle member funciton to check is Backend Registered Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: If0b9876068db8957a8bdb690ad323cd8dce544a4 !armnn:4924
2020-10-29IVGCVSW-5267 Remove boost from core android-nn-driverJames Ward
* WIP !armnn:4231 !armnn:4287 Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I7844efc84fac018d8aad1f72dd236ede3fd8e7f2
2020-10-23IVGCVSW-5353 - Fix skipped concat VTS testsDavid Monahan
* Added 3D permutation vector to prevent mismatch between mappings and numDimensions in dynamic concats Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ia580deaa8a4f6245c7e4d319d5d0ed837c7dc02a
2020-10-02IVGCVSW-5356 Fix skipping VTS DynamicOutputShape FullyConnectedFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I011466158b6736670bafba474e8c9ce12c38e229
2020-09-14IVGCVSW-5304 Remove boost::numeric_cast from Android-nn-driverMatthew Sloyan
* Replaced with armnn/utility/NumericCast.hpp Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I6253261508e49ddeaa5ba3f3893a059486637467
2020-09-11IVGCVSW-5245 Support Fused Activations for Dynamic TensorsKevin May
* Move ProcessActivation from Convert<LayerName> to SetupAndTrackLayerOutputSlot by passing optional ActivationFn * Connect Activation after IsTensorInfoSet() is called Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I472bcb65b12ae6e934bd1e9af8a6f6aceb311c0e
2020-09-08IVGCVSW-5270 Update ConvertConcatenation function to use ShapeInferenceMethodKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I13e16d271ba55217b98a439aa82931f809fdeeb8
2020-09-03IVGCVSW-5272 'Update ConvertLstm function to use ShapeInferenceMethod'Sadik Armagan
* Enabled Dynamic Tensors on LSTM operator Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I9cae539559570a44088a986870d3d3e41aee9468
2020-09-02IVGCVSW-5276 'Update ConvertSqueeze function to use ShapeInferenceMethod'Sadik Armagan
* Enabled dynamic type tensors on Squeeze operator in nn-driver. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I2092cf6087da2821a07bd4743c4676d5afb35e66
2020-08-20IVGCVSW-5220 Set all operations to unsupported after encountering an ↵Finn Williams
unsupported operation with with dynamic inputs Change-Id: Ia30698d608810dabb419d7d326ad985789d50603 Signed-off-by: Finn Williams <Finn.Williams@Arm.com>
2020-08-20IVGCVSW-5224 Fix for UnknownDimensionsTest in CpuRef and GpuAccKevin May
* Correctly handle HalOperandLifeTime::NO_VALUE in ConvertTranspose Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I36790a90b5a3eac3da9e4edafc96387bb4375db9
2020-08-19IVGCVSW-5220 Fix UnknownCombinationsTest/UnknownDimensionsTestFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@Arm.com> Change-Id: I4729497e67b711a8f1fbf7c555a26e97fa6c9ab6
2020-08-14IVGCVSW-5182 Update Convert functions to use ShapeInferenceMethod. 1/2.Teresa Charlin
* ConvertToActivation * ConvertAdd * ConvertArgMinMax * ConvertConv2d * ConvertDepthToSpace * ConvertDepthwiseConv2d * ConvertDiv * ConvertFloor * ConvertFullyConnected * ConvertL2Normalization * ConvertLocalResponseNormalization * ConvertMean * ConvertMul * ConvertPad * ConvertReshape * ConvertSub * ConvertStridedSlice * ConvertTranspose * ConvertBatchToSpaceNd * ConvertSpaceToBatchNd * ConvertComparison_1_2 * ConvertConv2d_1_2 * ConvertDepthwiseConv2d_1_2 * ConvertElementwiseUnary * ConvertExpandDims * ConvertGather * ConvertGroupedConv2d * ConvertInstanceNormalization * ConvertLogSoftmax * ConvertMaximum * ConvertMinimum * ConvertPadV2 * ConvertPrelu * ConvertQuantize * ConvertResize * ConvertSpaceToDepth * ConvertSoftmax * ConvertTransposeConv2d Signed-off-by: Finn Williams <Finn.Williams@Arm.com> Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Idacf16e5eab56d83fce293570bbc89381ae056dc
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-07-06Add support for Rank and scalar tensorsFinn Williams
!armnn:3330 Signed-off-by: Finn Williams <Finn.Williams@Arm.com> Change-Id: Icc429d9fabb570193d12bffef0e00dda7b51032f
2020-07-03IVGCVSW-4920 Invalid Negative Stride fixRyan OShea
* Added check for negative stride with ShrinkAxisMask Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: I8ba0a5e84cdc5d3367b683efb620f078b6cc4147
2020-05-19IVGCVSW-4453 Add Support for ANEURALNETWORKS_QLSTM to HAL 1.3 DriverSadik Armagan
* Add QLSTM support for Android NN Driver * Add overrideOutputInfo parameter to SetupAndTrackLayerOutputSlot * Add optional condition to GetInputScalar * Refactor Quantized 16 Bit LSTM impl Change-Id: Ie8fa98ad5ee4a62174ef91ca80f1df62b7fde937 Signed-off-by: Keith Davis <keith.davis@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
2020-05-14IVGCVSW-4531 StridedSlice Failures on HAL DriversSadik Armagan
* Check if the output is large enough to hold the slice in the driver Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Iaef16167e891a41186de030324bb45b8bbca4d80
2020-04-21IVGCVSW-4675 Fix VTS 1.3 GeneratedTest.Test/armnn_resize*David Monahan
* Added GetOptionalBool function * Added checks to Resize for unsupported operands AlignCorners and HalfPixelCenters !armnn:3062 Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ic0305014ed2638e3a3d1e7520972e3a2909e504b
2020-04-21IVGCVSW-4679 Fix VTS DeadlineTest failures 1.3 CpuAcc CpuRefSadik Armagan
* Optional timeline parameters are not supported yet. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ic5d6cd6af0cd87d4acba102a48fc94ec8b406377
2020-04-07IVGCVSW-4378 Fix transpose outputInfo for skipped Concat VTS in CL and NeonTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I7962be3a77cacf15dad594f0a907499c5b39bfeb
2020-04-07IVGCVSW-4485 Remove Boost assertNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: If602024a339df7548333e470545f9400c3daf7b3
2020-03-31IVGCVSW-4407 HAL 1.3 Operators SupportSadik Armagan
* IVGCVSW-4441 Add Support for ANEURALNETWORKS_ELU * IVGCVSW-4443 Add Support for ANEURALNETWORKS_HARD_SWISH * IVGCVSW-4448 Add TENSOR_QUANT8_ASYMM_SIGNED data type support Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Idb9bb3f463b956221711423c15b6557eeb1af7db
2020-03-26IVGCVSW-4447 Add Hal 1_3 SupportKevin May
* Add new 1.3 files HalPolicy, ArmnnDriver, ArmnnDriverImpl * Add new .rc file for 1.3 service * Add ArmnnPreparedModel_1_3 and implement new functions * Update Android.mk with 1.3 driver and service * Refactor ifdef to include ARMNN_ANDROID_NN_V1_3 * Create Utils getMainModel for new 1.3 Model Main Subgraph * Use android Utils to convertToV1_X in ArmnnPrepapredModel_1_3 * Refactor HAL 1.2 convert functions into ConversionUtils_1_2.hpp * Replace ArmnnBurstExecutorWithCache with call to ExecutionBurstServer Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I514069e9e1b16bcd1c4abfb5d563d25ac22d02e3
2020-03-19IVGCVSW-4565 TENSOR_BOOL8 data type not supported in AndroidNN DriverSadik Armagan
* Added TENSOR_BOOL8 support * Added Broadcast support to comparision operators !armnn:2903 Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I844e32b57399eff2dc60af9b2099145316c80cae
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-03-03IVGCVSW-4473 Android R pre Hal 1_3 build changesKevin May
* Update ErrorStatus to V1_0::ErrorStatus * Update Request to V1_0::Request * Update OperandType to V1_2::OperandType * Add namespace android::nn::hal in ArmnnDriverImpl for R only * Add missing g_RelaxedFloat32toFloat16PerformancePowerUsageName * Add namespace V1_0 or V1_1 where necessary * Update Android.mk with R macro and android.hardware.neuralnetworks@1.3 * Remove androidnn.go * include IAllocator in DriverTestHelpers * Remove unused LOCAL_CFLAGS Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I1787f1ed6784b3bbec017536d87d49197405e853 Signed-off-by: Kevin May <kevin.may@arm.com>
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
2020-02-20IVGCVSW-4375 Fixed driver crashesMike Kelly
* Fixed driver crashes caused by ignoring the result of GetTensorInt32Values. * Fixed driver crashes where padding, axis, permutation dimension or block size operands were inputs. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I59867e9545a240e6be46b7f68da6adaa120a56d8
2020-01-28MLCE-153 Padding calculation for TransposeConv ignores strideMike Kelly
* Changed ConvertTransposeConv2d to use the unsigned values for strideX and strideY not the signed values from the descriptor. !ComputeLibrary:2599 !armnn:2612 Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Iee300041f3ed585820b7c7e2edd8ab541f339d59
2020-01-27IVGCVSW-4301 Correctly validate reshape for broadcastable inputsDerek Lamberti
!android-nn-driver:2642 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Change-Id: I4db6ea4ed0a192c85f124c4a9ced60b1666a3870 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
2020-01-24IVGCVSW-4262 Add Calls to IsReshapeSupported and IsPermuteSupportedKevin May
!armnn:2643 * Add calls before addition of these layers in ConvertConcatenation * Add outputInfo parameter wherever needed for IsReshapeSupported Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Ic5d142ea046161960ff2fc137bd261ebb4e6ac0c
2020-01-24IVGCVSW-4260 Fix Transpose CpuRef VTS failuresJames Conroy
* Adds missing conversion for permutation vector from ANN/TF/Numpy format to ArmNN format. * Corrects legacy tests based on incorrect permutation vectors. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I767142378055e484d22f3ffba34580c528370cfe
2020-01-13IVGCVSW-3813 Add Unary Elementwise Operation support to the android-nn-driverjosh minor
* Account for deprecated Abs and Rsqrt layers in ArmNN * Update HAL 1.2 * Neg HAL operation support added !armnn:2542 Signed-off-by: josh minor <josh.minor@arm.com> Change-Id: I043bf64ac7ed3aea65560d72acf664e079917baf Signed-off-by: josh minor <josh.minor@arm.com>
2020-01-13Rename quantized data typesDerek Lamberti
!armnn:2571 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Change-Id: I06977553a097479a2a996e76a106249673d31ed7
2020-01-09IVGCVSW-4315 Fix Fully Connected infer output shape bugFinnWilliamsArm
Change-Id: If4fd1abdedf7de2046435d418fb1ee95ceb73419 Signed-off-by: FinnWilliamsArm <Finn.Williams@Arm.com>
2020-01-07IVGCVSW-4192 Add DEQUANTIZE to the android-nn-driverKeith Davis
* Support for QSymm8 in ConversionUtils.hpp Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I39c654e7a3821ffe74336a13bf0b922686f337d1
2019-12-06IVGCVSW-4225 Reject dynamic tensors to TRANSPOSEMatthew Bentham
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Change-Id: I1038d4f3c73d4e306161459784a0abf20d7e507d
2019-11-29Catch std::exception instead of armnn::ExceptionDerek Lamberti
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Change-Id: I89ae4f3b607ccb83f1bf16e085c805d5fc5cf89c
2019-11-28IVGCVSW-4209 Create a public API for the ArmNN UtilsMatteo Martincigh
* Using the new public armnnUtils API !armnn:2386 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ifa8af20ca131b1be19dbdceea6674a1274a396f3
2019-11-27MLCE-115 Remove redundant support checking for PermuteMatthew Bentham
This should all be done in the LayerSupport mechanism in Arm NN now. Change-Id: Icbbb1be2efad2ababf8bdd5543f3e5a06958dccd Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
2019-11-25MLCE-144 Fix 2d pooling convert functionFinnWilliamsArm
Signed-off-by: FinnWilliamsArm <Finn.Williams@Arm.com> Change-Id: I999d9091bc4046861433d4eb3109fe972611bd82
2019-11-25Refactor DequantizeIfRequired()Aron Virginas-Tar
* Added DequantizeStatus enum to capture the status of the dequantization process * Added alias DequantizeResult for the return tuple * Renamed instances of Operand, Operation and Model template variables to HalOperand, HalOperation and HalModel for consistency across ConversionUtils Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I2d5cf0dd9f9baba95684bb0b9fe20e63c0f377a3
2019-11-21IVGCVSW-4151 HAL 1_2 Dequantize FP32 Per Channel Tests on CpuAcc FailingSadik Armagan
* Quantization dimension other than 0 is not supported. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ied3914600a754b799e98d5660ad6196c8c4fa23d
2019-11-19IVGCVSW-3697 Add Support for ANEURALNETWORKS_ARG[MAX|MIN] to HAL 1.2 DriverFrancis Murtagh
!armnn:2313 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I543136e4e2ef9aece1378d2642064cc585246645
2019-11-18IVGCVSW-4137 Failing LSTM android-nn-driver Unit Tests in HAL 1.2Sadik Armagan
* Fixed for failing LSTM unit tests Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I773c5227bc8d5606924cc0472c51172476773056
2019-11-18IVGCVSW-4139 Fix regression in ConvertDequantize()Aron Virginas-Tar
* Removed TENSOR_QUANT8_SYMM from the list of generally supported tensor data types * Fixed tensor info in DequantizeIfRequired() for on the fly dequantized QSymm8 weights * Moved code for checking whether a Dequantize operator is linked to FullyConnected or Lstm weights from ConvertDequantize() into a separate function inside 1.2/HalPolicy.cpp Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I19ea6f89a90f553a964b87d44f8ad8a064e96f7f
2019-11-12IVGCVSW-4079 Modify the channel dimension accordingly with the weights ↵Teresa Charlin
permutation Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ie4a27d805d6d953fc54264ef9a0947f82c5b1ff8
2019-11-07MLCE-133 Fixed ASR hero use-casePablo Tello
* Added workaround in FC to deal with non const weights * Added workaround in LSTM to deal with non const weights Signed-off-by: Pablo Tello <pablo.tello@arm.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I854eea6a74a6959606ff25b52a0ed80b3e0a18ab
2019-11-06IVGCVSW-3841 Add support for per-axis quantizationAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: Ife7fa63b8839465e8f9f8626f34ca8c0f4d12788