aboutsummaryrefslogtreecommitdiff
path: root/Utils.cpp
AgeCommit message (Collapse)Author
2023-08-01IVGCVSW-7899 Cannot handle tensors with more than 5 dimensionsMike Kelly
* Fixed issue where then dimensions specificity didn't match the number of dimensions. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I72c116377276c8b7a4cd0db7f91eb911e697d420
2023-03-08IVGCVSW-7404 Out of bounds detectionMike Kelly
* Added test to ensure that all inputs and outputs do not go out of bounds. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ia97e85f71e46cd2203306243e4dcbc23e0f29ec1
2021-11-09Fixed Driver Crash in DumpTensorMike Kelly
* When handling Tensors DumpTensor was automatically trying to turn them into ConstTensors but then threw an exceptions when IsConstant returned false Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I8681bb3dd41cfe19c60fbd1cc9394c8b6cca551e
2021-11-04IVGCVSW-5636 'Implement NNAPI caching functions'Sadik Armagan
* Cached serialized ArmNN model. !armnn:6384 Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I78120a7f8ea892a28c0ff25f1b54e67a4f912574
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-07-19NNXSW-3081 Move Filesystem.hpp and Threads.hpp to public includeRob Hughes
!armnn:5954 Change-Id: Ic2904a0ccbcf24b30041a55d9c369c2424da1624 Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2021-06-16Add QUANT8_ASYMM_SIGNED in PadV2 for HAL1.3Teresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I597344d91975d7067f137e6587b751500de33837
2021-05-04IVGCVSW-5940 Enabling NN Driver dumps results in a driver segfaultMike Kelly
* Added checks to DumpTensor to handle situations where a shape has no dimensions or some unspecified dimensions Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: If9022a278d138ece12c7e347c61722bf5a2faf3b
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-04-12IVGCVSW-5763 Remove datalayout from dumps, as it is not known.Teresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ia2bdae7a38252414d295d10a0a2cbb9ae7b083d4
2021-02-15IVGCVSW-5665 Basic NN Driver support for next OS VersionSadik Armagan
Signed-off-by: Kevin May <kevin.may@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I1e1db52322092c6b1b7ac6183c3adc90aabcec24
2021-01-13IVGCVSW-4417 'Serialise ArmNN Model on android-nn-driver'Sadik Armagan
* Implemented serialization of the network on android-nn-driver !armnn:4850 Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I3caf07bd4d1d2a3068c58f0b344303c4cf977ca6
2020-10-07IVGCVSW-5298 Remove boost::format from Android-nn-driverColm Donelan
* Replaced with stringstream, string or filesystem::path Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I2aa80d88cc0eaff5de4dc6a121370ebf41dcb0a8
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-15IVGCVSW-5105 Fix CTS R 1.3 all backends Graph INT32 RANK1 ArgMinMaxTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ia1c28623438ebd720d447dbbf29d44fc01d502b5
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-04-30IVGCVSW-4771 Add support for Boolean and QAsymmS8 in dump filesTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I89c245c0d3ca291e1d9864121b68762205278f35
2020-04-07IVGCVSW-4485 Remove Boost assertNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: If602024a339df7548333e470545f9400c3daf7b3
2020-04-01IVGCVSW-4441 Add Support for ANEURALNETWORKS_ELU to HAL 1.3 DriverSadik Armagan
* Read alpha parameter for ELU operation * Created ConvertionUtils_1_3 for 1.3 Driver * Added QAsymmS8 data type support to swizzle the tensor Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I9d66a4e8d5468efa305bb8f6c352f13d27602274
2020-03-31IVGCVSW-4640 Fix HAL 1.3 build issues from update of AOSP masterKevin May
Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I19dd23f938f571f3f63bb1e070d27d27cbe65c1a
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-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-01-24IVGCVSW-4270 Change .dot file name to start with netIdJim Flynn
* .dot file will start with the same number as the associated input and output tensor dump files Change-Id: Ic64539854c2b8c34a7034fa18a142b2dfe67df7d Signed-off-by: Jim Flynn <jim.flynn@arm.com> IVGCVSW-4271 Add getSupportedOperations marker file * Also fix segfault in previous graph dump code Change-Id: I01915f47ae17d89ad3595430d073a17b1a1fda58 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-01-23IVGCVSW-4266 Dump float16 input/output tensorsJim Flynn
Change-Id: Iff91ce6857a9f96a7af65f79883c1cbe59a15dd2 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-01-23IVGCVSW-4370 Remove use of deprecated per-axis typeDerek Lamberti
!armnn:2620 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Change-Id: I8d71bac981a7576c7f51783833f76151495c62c0
2020-01-13Rename quantized data typesDerek Lamberti
!armnn:2571 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Change-Id: I06977553a097479a2a996e76a106249673d31ed7
2019-12-06IVGCVSW-4211 Rename QuantisedSymm8 to QSymmS8experimental/resizeCheckFinnWilliamsArm
!armnn:2421 Signed-off-by: FinnWilliamsArm <Finn.Williams@Arm.com> Change-Id: I30da5235f6610306f9300b4532cf2c79ee8789f8
2019-12-02IVGCVSW-4209 Remove the Half.hpp header usage from the driverMatteo Martincigh
* Removed the inclusion of the Half.hpp header from the Android NN Driver, as it's a private header not part of the now public armnnUtils API * Refactored the code not to use that header Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I0feeb86ccb31e016395e623029974f599a174149
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-19MLCE-144 Cts NNAPI test cases failedMike Kelly
* Fixed numerous CTS/VTS failures related to Quantization !armnn:2316 Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I50b7edf42e416abd230783a5081d1a6511bc42d4
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-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
2019-07-25IVGCVSW-3521 CpuAcc V1.2 pad FailuresMike Kelly
* Fixed Pad and PadV2 failures and skips. * Templated ConvertPad to enable float16 tests to run. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I50ded84fe44ea5d5949e877f383f32adff88680d
2019-07-23IVGCVSW-3553 Fix failing zero_sized testsAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: Idd10f34babc0d2552d599872b853ba5fb5c98351
2019-06-11IVGCVSW-3181 Add HAL 1.2 support to android-nn-driverMike Kelly
* Updated Android.mk to build HAL 1.2 driver * Added 1.2 HalPolicy and ArmnnDriver * Added 1.2 ArmnnPreparedModel * Updated converters and utilities to accept new HAL 1.2 operands and operand types. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I62856deab24e106f72cccce09468db4971756fa6
2019-05-07IVGCVSW-2911 Work towards compatibility with QMatthew Bentham
Explicitly use HAL V1_0 Operand, OperandType, and IPreparedModelCallback Change-Id: If6aa6e9dc1bd0b7673ec247ac3560e7f072ef699 Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
2019-01-07IVGCVSW-2421 Remove the template-based version of armnnUtils::PermuteMatteo Martincigh
in favor of a type-indepent implementation that takes void-pointers * Updated the code to make use of the new version of Permute !armnn:468 Change-Id: I10a5f353ee87822f161a968bb04d18af037fd103
2018-09-18IVGCVSW-1807: change license text in file headersDavid Beck
All changes are the same: // // Copyright © 2017 ARM Ltd. All rights reserved. -// See LICENSE file in the project root for full license information. +// SPDX-License-Identifier: MIT // Change-Id: Ibb7ed1e4e2191b9a978e26b5bacf916db403a60e
2018-09-18IVGCVSW-1806 Refactored Android-NN-Driver, added common "getCapabilities",Matteo Martincigh
"getSupportedOperations" and "prepareModel" implementations * Added common base ArmnnDriverImpl class * Added common template implementation of the driver's "getCapabilities", "getSupportedOperations" and "prepareModel" methods * Refactored ArmnnPreparedModel and RequestThread to support HAL v1.1 models * Moved "getStatus" to the common base class, as it is shared by both HAL implementations * Refactored the code where necessary Change-Id: I747334730026d63b4002662523fb93608f67c899
2018-09-18IVGCVSW-1770: Refactor ModelToINetworkConverter to allow conversion of ↵kevmay01
HAL1.1 operators Change-Id: I9b10f0a9c88344df108b2325c0233f9660fa6b7c
2018-08-31Release 18.08telsoa01
2018-07-05Release 18.05.02surmeh01
2018-03-29Release 18.03surmeh01
2018-03-09Release 18.02telsoa01
Change-Id: I41a89c149534a7c354a58e2c66a32cba572fc0c1