Tensorflow-Lite cannot compile [Machine : Apalis IMX8]

I’m trying to follow the steps on these pages to run the example code on an Apalis IMX8QM WB IT:

I’m running bitbake with the reference minimal image.
I’ve removed onnxruntime since I will only use tensorflow-lite.

There’s an execution error with tensorflow-lite: do_compile().

I’m getting the following error :

ERROR: Task (/home/user1/oe-core2/build/…/layers/meta-ml/recipes-libraries/tensorflow-lite/tensorflow-lite_2.8.0.bb:do_compile) failed with exit code ’

Everything else seems to compile just fine, tensorflow-lite is the only one giving an error.

In the error log, there are two more things -

  1. “Error: selected processor does not support `fmla v16.8h,v20.8h,v0.h[0]'” in …/oe-core2/build/tmp/work/cortexa72-cortexa53-tdx-linux/tensorflow-lite/2.8.0-r0/build/xnnpack/src/f16-gemm/gen/1x8-minmax-aarch64-neonfp16arith-ld64.S

I have limited the number of bitbake threads to 5 to reduce RAM usage.

How do I fix this error, since I think tensorflow-lite is correctly downloading the required files and the issue is only with the compilation.

In addition, I have a few questions :

  • Since the steps are given for the Verdin board, is there anything I need to change in the procedure followed?
  • Is it even possible to run bitbake for the tdx-reference-minimal-image? I do not require all the components present in the multimedia image and just want to test the example code on the page. The complete multimedia image will take a long time to build.
  • Is it possible to build without onnxruntime, pytorch, and deepview-RT?

The PC specs are : Ubuntu 20.04.5 LTS 64 bit, 16 GB RAM, 12th Gen Intel® Core™ i7-12700 × 20

Hi @IshaanSethi

Welcome to toradex community.
I could able to reproduce the issue at my end.Let me check with our team and get back to you.
Meanwhile if possible,could you check with the torizoncore image?

Hi @IshaanSethi

could you check with BSP v5.7?

Hi Ashok,
I’ll try for both the TorizonCore and BSP5.7 builds, but is it possible to build with the minimal image? Or are there some packages in the multimedia image that need to be added to the minimal image to fulfil dependencies?

Hi @IshaanSethi

Reference minimal image idealy is for headless devices i.e it comes without graphics support.You can build the tensorflow-lite package with the same image.if you want to use reference multimedia image,you can remove unwated packages using IMAGE_INSTALL:remove or altering the tdx-reference-multimedia-image.bb file.