ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.14k stars 307 forks source link

support CEIL operator for ArmNN #640

Closed choujayyl closed 1 year ago

choujayyl commented 2 years ago

I use ARM-NN v22.02 release package ArmNN-linux-x86_64.tar.gz load yamnet model,but get some error: image

error message:

Can't load libOpenCL.so: libOpenCL.so: cannot open shared object file: No such file or directory
Can't load libGLES_mali.so: libGLES_mali.so: cannot open shared object file: No such file or directory
Can't load libmali.so: libmali.so: cannot open shared object file: No such file or directory
Couldn't find any OpenCL library.
Error: Failed to parse operator #6 within subgraph #0 error: Operator not supported. subgraph:0 operator:6 opcode_index:6 opcode:104 / CEIL  at function ParseUnsupportedOperator [/devenv/armnn/src/armnnTfLiteParser/TfLiteParser.cpp:960]
terminate called after throwing an instance of 'armnn::ParseException'
  what():  Failed to parse operator #6 within subgraph #0 error: Operator not supported. subgraph:0 operator:6 opcode_index:6 opcode:104 / CEIL  at function ParseUnsupportedOperator [/devenv/armnn/src/armnnTfLiteParser/TfLiteParser.cpp:960]

yamnet link address: https://www.tensorflow.org/hub/tutorials/yamnet

So how fix it?

choujayyl commented 2 years ago

So CEIL operator not support by ArmNN?

MikeJKelly commented 2 years ago

Hi @choujayyl

CEIL is not currently supported in the ArmNN TFLiteParser you can see a list of the supported operators here:

https://arm-software.github.io/armnn/latest/parsers.xhtml#S6_tf_lite_parser

If you want to you could use the ArmNN TFLite Delegate instead of the TFLite Parser.

If the TFLite parser encounters an unsupported operator then it exits with the error you've seen but if the TFLite delegate encounters an unsupported operator then those will be handled by the default TFLite implementation.

How are you running the model? If you're using ExecuteNetwork you can add -T delegate to the command line to run your model using the ArmNN TFLite Delegate.

Something like

ExecuteNetwork -f tflite-binary -m //path/to/model.tflite  -i inputnames -o outputnames  -c CpuRef -T delegate
choujayyl commented 2 years ago

@MikeJKelly I was try ExecuteNetwork with delegate,cmd

./ExecuteNetwork -f tflite-binary -m ./lite-model_yamnet_tflite_1.tflite -T delegate -i waveform -o Identity_2 -c CpuRef -d ./1.PCM

but get some error: Info: ArmNN v28.0.0 Info: Initialization time: 0.18 ms. INFO: TfLiteArmnnDelegate: Created TfLite ArmNN delegate. ERROR: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors. Fatal: Could not register ArmNN TfLite Delegate to TfLiteInterpreter! Info: Shutdown time: 0.01 ms.

choujayyl commented 2 years ago

@MikeJKelly
Any suggestion?

TeresaARM commented 1 year ago

Hi @choujayyl you can add to your executeNetwork command: --infer-output-shape it seems your model does not have explicitly mentioned all the shapes

for more options you can do ./ExecuteNetwork --help

Regards

AliSheheryar commented 1 year ago

How to download binaries for ArmHF platform. Official documents listed platform for arm64 but I want to implement on arm v7-l(armhf).

TeresaARM commented 1 year ago

Support for CEIL has been added to Arm NN. Arm Compute Library does not support CEIL: https://arm-software.github.io/ComputeLibrary/v23.02.1/operators_list.xhtml#S9_1_operators_list You can still use -T delegate