aboutsummaryrefslogtreecommitdiff
path: root/src/armnnOnnxParser/OnnxParser.cpp
AgeCommit message (Collapse)Author
2024-05-13Add deprecation notices for items to be removed in 24.08.Colm Donelan
* Onnx parser. * Async execution interface. * Shim and support library. * Arm NN converter * GpuFsa backend. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Ia9adae4da6d9bd2b92a4f4492a022e8337f57f14
2023-10-03IVGCVSW-7749 DTS: Fix reshape floating point exceptionTianle Cheng
* Updated Opaque Delegate, TfliteParser, OnnxParser, and Deserializer to handle the Zero In Shape edge case Signed-off-by: Tianle Cheng <tianle.cheng@arm.com> Change-Id: I4a0d1e72a66de1fa56de99af9b6730a84e0ff596
2023-08-04IVGCVSW-7676 Audit the use of ARMNN_ASSERTRyan OShea
* Replace most ARMNN_ASSERT's from tflite parser * Replace most ARMNN_ASSERT's from onnx parser * Replace some ARMNN_ASSERT's from tflite delegate * Replace some ARMNN_ASSERT;s from include files Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: Ie052e0180060203f28f64ebf54acad298f431caf
2023-05-09IVGCVSW-5846 Remove TODO statements from Armnn CodeDavid Monahan
* Removed all instances of TODO statements from comments * Removed statements are noted as part of IVGCVSW-5846 * Removed ProtoxtFixture.cpp from the Onnx Parser tests as it's not used Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ia0a15f8a0d4123c8831638634eaa0d1018c40e2c
2023-03-14IVGCVSW-3808 Add ElementwiseBinaryLayerMike Kelly
!android-nn-driver:9329 * Added ElementwiseBinaryLayer that can represent all ElementwiseBinary operations including Add, Div, Sub, Maximum, Mul and Minimum. * Updated Delegate to use ElementwiseBinaryLayer instead of the Add, Div, Sub, Maximum, Mul and Minimum layers. * Updated Deserializer to use ElementwiseBinaryLayer instead of the Add, Div, Sub, Maximum, Mul and Minimum layers. * Updated OnnxParser to use ElementwiseBinaryLayer instead of the Add layer. * Updated TfLiteParser to use ElementwiseBinaryLayer instead of the Add, Div, Sub, Maximum, Mul and Minimum layers. * Updated CL and Neon tests to use ElementwiseBinaryLayer. * Updated CL and Neon Backend Specific Optimizations to accept ElementBinaryLayers as well as Add, Div, Mul, Sub, Maximum and Minimum layers. Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I7cbb96b60eb01f0e2b57b0541016d48a08b86c75
2023-02-16GitHub #714: OnnxParser FullyConnectedLayer inferred shape doesn't matchMatthew Sloyan
* Added reshape before and after FullyConnected to support dimensions > 2. This is now consistent with the Delegate and TfLiteParser. * Refactored AddFullyConnected method to remove duplicate code. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I04dfeb38dbcac096c5fcd9dcb5e3821d38ce6550
2023-01-03GitHub #709 Provide a CreateNetworkFromBinary method for the ONNX parserMike Kelly
* Added CreateNetworkFromBinary to the ONNX parser Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I5ca72ee49c7b098f9fb4aaf55a8bc077230cb30e
2022-05-23IVGCVSW-6123 ConstTensorsAsInputs: Conv2dKeith Davis
* Use new INetwork::AddConvolution2dLayer instead of deprecated version * Remove duplicated test in SerlializerTests * Fix some cosmetics Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I3407815bfdc1cdc01ca0a667b8e4d80d8621783f
2022-05-18IVGCVSW-6147 ConstTensorsAsInput: Optimizer - FusePermuteIntoConstLayerCathal Corbett
* No trailing permute layer after a constant layer * Unit test for optimization Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I0d098f5af41d2c55df7cef1ccfb848093320ddc1
2022-05-16IVGCVSW-6124 ConstTensorsAsInput: Conv2d - FrontEndKeith Davis
* Update Front-end and Tools. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Updated Ref. * Fixed resulting Neon / CL tests * Unified optimizers for conv2d ops * Optimizer Fix - Fp32ToBf16 * Partial implementation for ACL backends to fix VTS failures !android-nn-driver:7477 Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I5fb18877f7ee32643e15a9818945356274bb401b
2022-05-05IVGCVSW-6127 ConstTensorsAsInput: DepthwiseConvolution2dCathal Corbett
!android-nn-driver:7418 * Update Front-end and Tools. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Change NNDriver to new API. * Updated Ref. * Neon and Cl backend partially completed (Backend.cpp files). * Added dynamic or constant input EndToEnd tests. * Added ConstantTensorAsInputMemeberVariableRedirect Optimization. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ib18b6c10a093042e165e25237dc04a4c67ba82da
2021-10-21IVGCVSW-6451 Add support for Reshape when the target shape is dynamicNarumol Prangnawarat
and batch size is unknown to ONNX parser Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I46b2daccce9e1a21d9d0550ac4126d2c79dbd37b
2021-10-18IVGCVSW-6450 Add Support of Models with Dynamic Batch Tensor to ONNX parserNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ia7dbf0735619d406d6b4e34a71f14f20d92586e6
2021-10-08IVGCVSW-6449 Add GEMM operator support to ONNX parserNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I3c6979c72d44a15fb2dc3afc22ac30d1428684b0
2021-10-07IVGCVSW-6459 Add support of scalar and flexible output datatypes to ONNX parserNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Id1e933f6ae55ddc1a57c80c9f6a5757ccb61f018
2021-10-05IVGCVSW-6382 Add Concat operator support to ONNX parserNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I435723160e9b639a70e0b48ee9d722d306461291
2021-09-29IVGCVSW-6382 Add Unsqueeze operator support to ONNX parserNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ie0b68b08fc31444c58b0ffc9babdd456bbb51f35
2021-09-24IVGCVSW-6382 Add Gather operator support to ONNX parserNarumol Prangnawarat
* Add ParseGather to support Gather operator on ONNX * Add Support of int64 converted to int32 for constant * Add OnnxParserTestUtils * Refactor ValidateTensorShapesFromInputs of GatherLayer * Unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ie9dff640240e14a062fef38f7faf0ccc212de5f7
2021-09-16IVGCVSW-6382 Add Shape operator support to ONNX parserNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I3547effcbebf1ebc02d3b20f5db394a26991424d
2021-09-16Add support for Clip with attribute on ONNX parserNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I1bae42dade7eabf3da09252066e912e803a8ea32
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-06-16IVGCVSW-5826 Change weights layout for depthwise to [1,H,W,I*M]Jan Eilers
* This change is necessary because tflite uses a [1,H,W,I*M] format and uses the I*M dimension for per axis quantization. Our previous layout [M,I,H,W] can't handle the correlating quantization scales. * Updates Onnx-, TfLiteParser and TfliteDelegate * Updates the CpuRef, CpuAcc and GpuAcc backends * Adjusts unit tests * Adds test to ensure models with old layout can still be read and executed * Adds conversion function to previous layout [1,H,W,I*M] --> [M,I,H,W] which can be used by backend developers !android-nn-driver:5553 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ifef23368b8c3702cf315a5838d214f7dc13c0152
2021-02-08IVGCVSW-4901 Add semantic versioning to Parsers and TfLite DelegateMatthew Sloyan
* Added Version.hpp to all Parsers * Added Version.hpp to TfLite Delegate * Updated CMakeLists to use new versions * Added GetVersion method to parsers and TfLite Delegate Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: If29e1e6d9e615f9095ec1c01ad47acfff40b1dd5
2021-02-05MLCE-326 'Support Dilation in Conv2D in ONNX and Tensorflow Parsers'Sadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I4a0f07b1e8f80aff0d29405def1f33bde7944e31
2021-02-04IVGCVSW-5592 Implement Pimpl Idiom for Caffe and Onnx ParsersKevin May
Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I760dc4f33c0f87113cda2fa924da70f2e8c19025
2020-10-27IVGCVSW-5077 Ensure ArmNN builds successfully with latest protobufNikhil Raj
* Use the single parameter version of SetTotalBytesLimit() * Update CMakeLists to turn off deprecated declarartions Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I2d360966743986872cfef40c2ab1a3505fc5d99a
2020-10-02IVGCVSW-5296 Remove boost::format armnn parsersJames Ward
* replaced with fmt::format * one case required std::stringstream instead Signed-off-by: James Ward <james.ward@arm.com> Change-Id: Ica9a7eb4e7bed04aa03172058dd9e3d10efc8548
2020-09-14IVGCVSW-5302 Remove some boost::numeric_cast from parsersMatthew Sloyan
* Replaced with armnn/utility/NumericCast.hpp * Exclusions in armnnCaffeParser * Three excluded as requires float implementation in NumericCast.hpp Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ib468b606238694334a8319d0ed5db381ce37a915
2020-04-23IVGCVSW-4496 Add Flatten support to ONNX parserRyan OShea
* Added ParseFlatten method * Added Read int64 attribute method - Modified ComputeReshapeInfo method - Modified ParseReshape * Added unit tests - Reorganised OnnxParser.cpp/.hpp Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: I8a9553438dd1e8c702d821b093587e0074c027d5
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
2020-04-03IVGCVSW-3753 Add Clip support to the onnx parserFinn Williams
Change-Id: I68c842c5906f03b8f5a6131537fea3a1a0db980a Signed-off-by: Finn Williams <Finn.Williams@arm.com>
2020-02-21IVGCVSW-4307 Onnx Segfault BugRyan OShea
* Fixed ParseConstant * Fixed Exception * Fixed 0 dimension tensor * Add unit test to check addition as tensor and scalar * Change C++ style comments to Doxygen style Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: Ied7cbe2e11e713c23d87106d2db39e0eb446c920
2020-01-20Remove use of ArmNN.hpp where it is unnecessary.Matthew Bentham
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Change-Id: I6c90eab1c6bad76d5c7b3bf094998fa4b454bcd1
2019-11-15Fix possible crash in case of zero dimension tensor in the ONNXTee Jung
parser Signed-off-by: Jung Tae-young <tee.ty.jung@openedges.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I396792d4d59172cccb50d77de7e6b74977b289ed
2019-11-04Make onnx parser to support TanH / Sigmoid / LeakyRelu layersTee Jung
Signed-off-by: Jung Tae-young tee.ty.jung@openedges.com Change-Id: I44d24b525b78b8d3fee0197abda7bd667eb04d83
2019-11-04Fix crash issueTee Jung
* armnnOnnxParser makes tensorInfo from graph->value_info but PyTorch does not add weight/bias tensor information to graph->value_info so tensorInfo of const tensor should be extracted from graph->initializer Signed-off-by: Jung Tae-young tee.ty.jung@openedges.com Change-Id: Ib2656dd25abc522012cf413e843fe03949cb2eb0
2019-05-28IVGCVSW-3119 Rename MergerLayer to ConcatLayerJim Flynn
!android-nn-driver:1210 Change-Id: I940b3b9e421c92bfd55ae996f7bc54ac077f2604 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-05-14Use the new deprecation APIMatteo Martincigh
* Used the new ARMNN_DEPRECATED_MSG macro instead of @deprecated * Refactored the code to no longer use the deprecated methods where applicable !android-nn-driver:1126 Change-Id: Ib0578d3d6fc5a763f5fb922f67ba91fafc7796f6 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-04-26MLCE-111: ONNX parser raw data bugPablo Tello
Fixed bug in ONNX parser: unable to load raw data from the binary models. Change-Id: Iec60d2f90b78ffe6910fdec6e6bd2eb05802ffd0 Signed-off-by: Pablo Tello <pablo.tello@arm.com>
2019-04-10IVGCVSW-2947 Remove boost dependency from include/TypesUtils.hppAron Virginas-Tar
!android-nn-driver:968 Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I03ccb4842b060a9893567542bfcadc180bbc7311
2018-12-10Fix the ONNX parser buildMatteo Martincigh
* Fixed invalid conversion issues to onnx::TensorProto::DataType Change-Id: If8f1cef1d02a22cfecf24135a960923d3ad0e14c
2018-09-17IVGCVSW-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: I37eae011411133663ca9d2b059714d92f8bf8e24
2018-08-31Release 18.08telsoa01