armnn icon indicating copy to clipboard operation
armnn copied to clipboard

support CEIL operator for ArmNN

Open choujayyl opened this issue 3 years ago • 4 comments

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 avatar May 06 '22 09:05 choujayyl

So CEIL operator not support by ArmNN?

choujayyl avatar May 09 '22 07:05 choujayyl

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

MikeJKelly avatar May 09 '22 18:05 MikeJKelly

@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 avatar May 10 '22 06:05 choujayyl

@MikeJKelly
Any suggestion?

choujayyl avatar May 12 '22 08:05 choujayyl

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

TeresaARM avatar Mar 22 '23 17:03 TeresaARM

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

AliSheheryar avatar Mar 24 '23 08:03 AliSheheryar

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

TeresaARM avatar Apr 19 '23 10:04 TeresaARM