aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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
2023-07-04IVGCVSW-7862 Replacing use of std::filesystem with ghc::filesystemFrancis Murtagh
Even though we're using C++ 17 we still do a Debian buster build. This prevents using some new libraries. In this case std::filesystem. Change-Id: Icbdcac8a53d5931f25f8aa77c7422aa0b8ae94d4 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2023-07-03Replacing use of std::filesystem with ghc::filesystem.Colm Donelan
Even though we're using C++ 17 we still do a Debian buster build. This prevents using some new libraries. In this case std::filesystem. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Icdf3460cb5dd0e3ed2f07fccc5b89bd8975d488d
2023-07-03IVGCVSW-7773 Fix for ExecuteNetwork `--output-network-details-only` not ↵Declan-ARM
working with `-T delegate` flag * Removed original SetInternalProfilingParams * Added Undefined Profiling DetailsMethod for delegateOptions * Replaced with if / else block to handle DetailsOnly and DetailsWithEvents Signed-off-by: Declan-ARM <decmce01@arm.com> Change-Id: Id0c91892732c5c6b59696a43c6a73a22cbfffa09
2023-06-30IVGCVSW-7666 Add a FileComparisonExecutor to ExecuteNetwork.Colm Donelan
* Implement the "-C" command line option of executenetwork. * Add a FileComparisonExecutorFile which will read tensors from a previously written text file and compare them to the execution output. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I8380fd263028af13d65a67fb6afd89626d1b07b8
2023-06-26Fixing fault in ExeNet when a model file does not include an extension.Colm Donelan
If you pass a file name without an extension as the -m parameter to execute network it won't be able to determine the parser to use. This results in a segmentation fault. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I91821a5abd50b65b8d60409aa9a807013e0b0e6a
2023-06-08Fix issue with ExecuteNetwork when running with tflite executorNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Id404893c47d43dafa743f4b9524001072b426509
2023-05-09IVGCVSW-7626 Change sequence of Interpreter BuildingNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I3f0e224c90a4eea9945183028c9de1b61e75e510
2023-05-08IVGCVSW-7626 Add Execute Network for Opaque DelegateNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ibdded86713368ecfdf31c4118dfe8a3404d1e3b8
2023-04-26Update cxxopts from 3.0 to 3.1.1Jim Flynn
!android-nn-driver:9431 Signed-off-by: Jim Flynn <jim.flynn@arm.com> Change-Id: I58143445b5c5cf2aafd0838156c9543adce21e6a
2023-04-12IVGCVSW-7197 Implement Pimpl Idiom for OptimizerOptionsJohn Mcloughlin
Signed-off-by: John Mcloughlin <john.mcloughlin@arm.com> Change-Id: Id4bdc31e3e6f18ccaef232c29a2d2825c915b21c
2023-04-05IVGCVSW-6681 Improve error handling in TfLiteExecutor.Colm Donelan
The initial model load and tensor allocation operations against the TfLiteInterpreter were not checking return codes resulting in segmentation faults. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I812785f0af9012c97570065d200f72eaf781165a
2023-03-31Bugfix: Fix conversion issue in NetworkExecutionUtilsFrancis Murtagh
* conversion from ‘double’ to ‘float’ changes value Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Iebcc8adea54590fb6153db503e1dfccb082c9bd3
2023-03-28IVGCVSW-7555 Restructure DelegateTeresa Charlin
* New folders created: * common is for common code where TfLite API is not used * classic is for existing delegate implementations * opaque is for new opaque delegate implementation, * tests is for shared between existing Delegate and Opaque Delegate which have test utils to work which delegate to use. * Existing delegate is built to libarmnnDelegate.so and opaque delegate is built as libarmnnOpaqueDelegate.so * Opaque structure is introduced but no API is added yet. * CmakeList.txt and delegate/CMakeList.txt have been modified and 2 new CmakeList.txt added * Rename BUILD_ARMNN_TFLITE_DELEGATE as BUILD_CLASSIC_DELEGATE * Rename BUILD_ARMNN_TFLITE_OPAQUE_DELEGATE as BUILD_OPAQUE_DELEGATE Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ib682b9ad0ac8d8acdc4ec6d9099bb0008a9fe8ed
2023-03-06Fixing compare output feature in ExecuteNetworkColm Donelan
The -A -B -C options in execute network were attempting to calculate the RMS error over output tensors. However, the calculation was mixing tensor elements and bytes when doing the calculation. This patch changes the calculation to use a per byte RMS error calculation. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: If30230a16cfed1a8804b4d54ed1abcd371f26664
2023-02-06IVGCVSW-7476 Remove ProfilingOptions from DelegateOptions.Colm Donelan
ProfilingOptions is not used in DelegateOptions. Instead the parameters are passed in through the RuntimeOptions. This is done in ExecuteNetwork and TfliteExecutor. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Iaab3d4ef277c47e1ff82a51ba2648f5f51ec3e2c
2023-01-31Fix for ExecuteNetwork Delegate when output is booleanRyan OShea
* When the output of a network is a boolean from a comparison layer ExecuteNetwork was missing the data type when writing the output tensor Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: Id9c1609462395a68e8c1842c77a4a033a10f74e8
2023-01-27IVGCVSW-7441 Checking for constant input tensors before populating.Colm Donelan
* When the tfLiteExecutor attempts to populate the input tensors it did not check whether the tensor was constant. This was causing segmentation faults. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I80a4cc788de4ffe08afb2df9185d04fcb8b27c3a
2023-01-25IVGCVSW-7441 Fixing null pointers in ExecuteNetwork.Colm Donelan
* Check if BuildExecutor returns null in ExecuteNetwork. * Check if tflite BuildFromFile returns null in TfliteExecutor. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I42b6e5f26dfd127dd16b6b322184900846317c41
2023-01-24IVGCVSW-7297 When creating multiple Executors only the lastMike Kelly
one works fine * All ArmNNExecutors now share a single IRuntime. * All armnn_delegates now share a single IRuntime. * Increased delegate major version. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I95cbdc32655ec0beb476dbb2d60f1a0209df8f04
2023-01-10Update --compare-output description in ExecuteNetwork parameters.Cathal Corbett
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ic6bbbaa04aabaa5c3fd525acd5121f07d3392120
2023-01-06IVGCVSW-7031 Generate static execute networkRyan OShea
* Build ExecNet lib dependencies as object libs except libarmnn * Disable PIPE when building static ExecNet * Remove multiple definition from AsyncExecutionCallback * Disable DynamicBackend for ExecNet Static build * Disable inference tests for TfLiteParser and ONNX during static ExecNet * Remove Tensorflow Parser if condition * Add Disable thread macro to InferenceModel * Don't compile dynamic backend symbols in Runtime.cpp for Baremetal and Exenet Static Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: If41c063eab5f05b3df0a6e064924a36a177f116a
2022-12-20IVGCVSW-7409 GPU backend options not being passed from the delegate.Colm Donelan
Two problems here: * First the Delegate was using the parameter options after the execution of std::move on it. * In ExecuteNetworkParams 3 GPU backend options were instead being set as optimizer options. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I61c7fad8a5819a0a4aec0243899019a342c5cc5f
2022-12-13IVGCVSW-7365 Fix behaviour of --import-inputs-if-aligned in ExecuteNetworkMatthew Bentham
Move call to 'SetupInputAndOutputs' to after LoadedNetwork is available. Change-Id: I101e297d1d7b2517011d4ef3f1a4927566845474 Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
2022-12-12Updates following execution of Includewhatyouuse on armnn/include.Colm Donelan
This tool forces explicit includes of all dependencies and highlights unused dependencies. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I92e449245246452a0227cbd13f9c082e2088bf8c
2022-12-05Fix build error due to missing includePablo Marquez Tello
Change-Id: I38fa4b49b0cdb506293c7b0e75146b56649839b8 Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
2022-11-30IVGCVSW-7220 Remove referencetests repo and testing of itKevin May
* Remove mentions of reference tests Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Idd3c8b2e48f03531b1ec6cc67fd3bd32e50086c3
2022-11-16IVGCVSW-7214 Disable BF16-Turbo-Mode and remove conversion layersRyan OShea
- Remove Bf16ToFp32 Conversion Layer - Remove Fp32ToBf16 Conversion Layer - Remove B16 Conversion tests * Throw exception if m_ReduceFp32ToBf16 optimzer option is set to true * Provide comments to enable fast math in order to use bf16 * Update docs to inform users to enable fast math for bf16 Execute Network Changes * Require bf16_turbo_mode to also have fast_math_enabled set to true - Remove setting m_ReduceFp32ToBf16 optimizer option Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: Ibaa6da9d29c96a1ce32ff5196b0847fde9f04a1c
2022-11-15Minor error formatting fixes.Colm Donelan
Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I17823fb8b6bbabc4da327187167ce9582ee29b32
2022-11-15IVGCVSW-7332 Fix Delegate Profiling in ExNet with multiple iterationsKevin May
Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: If837e4bec7940b53d18d0da32f3e736215dd2a03
2022-11-11IVGCVSW-7356 Bug Fix for Execute Network Delegate when input names not givenTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I2fd0f6aac6ffff695b17df7455f252f6013c0d43
2022-10-27IVGCVSW-7282 Issues in ExNet when iterations and number of inputs do not matchTeresa Charlin
* The intention is to keep the flexibility given by the ExNet before the refactor. * When iteration > inputFiles, we repeat the usage in order * When iteration < inputFiles, we just discard extra files. Signed-off-by: Adam Jalkemo <adam.jalkemo@arm.com> Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I2fbe69f8affe0e3a5cc86fc1748164967f0c2d64
2022-10-27Revert "IVGCVSW-7282 Issues in ExNet when iterations and number of inputs do ↵Teresa Charlin
not match" This reverts commit 6c95836e894f88c4bab6b22f974341f0dd2dddaa. Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I8be2147feb557a0849de5785fb63b464abc7dbb9
2022-10-25IVGCVSW-7282 Issues in ExNet when iterations and number of inputs do not matchCathal Corbett
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ib30fc633a10b6ff8090b50314278fe5dc46fb250
2022-10-23IVGCVSW-7126 Modify odrer of Tf 2.10 librariesColm Donelan
* Modify the order of Tf absl libraries in delegate build. * Disable failing delegate unit tests. * Add -Wno-comment to delegate ExecuteNetwork build. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I9e4696e032a5e26df8ba578b980456cbac4d0ab0
2022-10-19MLCE-545 INT8 TFLite model execution abnormalKeith Davis
* Add functionality to print output tensors to file in tempdir * UnitTests Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Idfb4c186544187db1fecdfca11c662540f645439
2022-10-18ExecuteNetwork: Fix output format issue for int8 when using -wAdam Jalkemo
Change-Id: I594ded82493e9cc48cafa6f00d63769fefba5afe
2022-10-14IVGCVSW-7267 Make the AllowExpandedDims option workJim Flynn
Signed-off-by: Jim Flynn <jim.flynn@arm.com> Change-Id: I3573078206272c3a72a2b3acf8781ab458ea6c90
2022-10-13IVGCVSW-7288 ExecuteNetwork fix for multiple outputsAdam Jalkemo
* When a model with multiple outputs was used and output to file, e.g. with "-w ./boxes,./classes,./scores,./detection", the results where not saved in the correct files. * Applies only to the ArmNNExecutor. Change-Id: I2899322622a4c3fd1d0ddc75b100b81669417660
2022-10-13IVGCVSW-7283 Use stricter file extension check in CreateParserAdam Jalkemo
* I had issues when folder name contained "armnn" and a .tflite model was used, as the wrong parser was selected. * Now only the extension, and not the full string, is considered when selecting parser. Change-Id: If7964d2ce5535f7d25762d2a2d7e810bf1a1ed43
2022-10-11IVGCVSW-7222 Fix incorrect kernel measurements in profiling outputKevin May
* Some CL kernels are not run after the first inference and this breaks the profiler which is expecting a measurement for every kernel each run * Add a function HasKernelMeasurements() to ascertain if the Event is returning kernel measurements and if so insert 0.0 values for any missing kernel measurements. * Fix ExecuteNetwork to only print a json object after all inferences have completed Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I99f2bb0db847f5a52ab4c5705b072155c6b6f333
2022-10-04MLCE-545 INT8 TFLite model execution abnormalKeith Davis
* Signed32 missing from CompareAndPrintOutput Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: If3c93fb0d73c566ddcf439fceaa6d629029df18f
2022-09-27IVGCVSW-7235 Errors from LoadNetwork are being ignored in ArmNNExecutor.Colm Donelan
In ArmNNExecutor::ArmNNExecutor the call to m_Runtime->LoadNetwork was ignoring the Status result and continuing to execute with a failed network. In addition throwing an exception from the constructor resulted in a segmentation fault. * Modify IExecutor to allow the constructor to mark itself as failed. * Modify ArmNNExecutor to mark itself as failed when LoadNetwork returns an error. * Modify ExecuteNetwork to check the value of m_constructionFailed. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Idf222cb2b66e1051875dc67046734f2b00b288d1
2022-09-06IVGCVSW-7006 Remove deprecated code due to be removed in 22.08Teresa Charlin
* AddConv and AddDWConv with weights and bias * ResizeBilinearDescriptor * b,blacklist option in accuracy tool !android-nn-driver:8172 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ibbc04fd18be7f938b11590bf67cd7af103cb4d99
2022-08-05IVGCVSW-7179 Segfault running ssd_mobilenet_v2_int8 with ExNet and delegate.Teresa Charlin
* model was declared in the TfLiteExecutor constructor, instead of intializing m_Model * Working with this model that has 4 output we saw the the output names were not correct, this got fixed too Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I48f194ad4ba6af43d43e6eea336eb87ffee02dcc
2022-08-05IVGCVSW-7157 ExNet. interpreter chooses a different input type.Cathal Corbett
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: If00d8dab2846c484a1969fb152cb9f8bd16e1b3e
2022-08-05Bug Fixes for refactor of the ExecuteNetwork.Teresa Charlin
* dot file to be generated when -v is given. It was only being generated when using the delegate as executor * output name read from m_Params.m_OutputNames instead of m_TfLiteInterpreter * typo: "delage" instead of "delegate" * QAsymmS8 templated as int8, instead of uint8 Change-Id: Ie13ae0f7e6395c0ebcb5ecda32e72082dee8aa6c Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Iac97a23927ba42290ebeb3446bbd36da15045e07
2022-07-28Revert "Revert "IVGCVSW-6650 Refactor ExecuteNetwork""Teresa Charlin
This reverts commit 1a7f033768acb27da11503bd29abb468d2e77f9e. List of fixes to be able to add this code again: * "emplacing_back" the vector inputTensors into the vector m_InputTensorsVec outside the for loop * GetIOInfo() uses IOptimizedNetwork instead of INetwork, where the infered shapes are not saved * Add missing data type Signed32 to SetupInputsAndOutputs() * PrintOutputTensors() prints the actual output without dequantizing * Add profilingDetailsMethod as input in networkProperties in ArmNNExecutor constructor * Fix typos Change-Id: I91de166f87228282db3efa27431fe91458834442 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ic6634d48892d11e5f146cdf285e1e333e93e9937 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2022-07-27IVGCVSW-7061: Use same sentence for Aynch execution in ExNetTeresa Charlin
* "Asynchronous Execution with std::launch:async..." * "Asynchronous Execution with Arm NN thread pool..." Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I93f6ae92fd5599d1042f0dfced7e90ef85e20463
2022-07-27IVGCVSW-7096 Harmonise macro ARMNN_TFLITE_DELEGATETeresa Charlin
* Remove ARMNN_TF_LITE_DELEGATE and DARMNN_TF_LITE_DELEGATE Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I3fc08da3fa0b733e6791c42f6bc59494f2bc26a6