TFLite NPU Inference on Luna SL1680

Hi,

We’ve been experimenting with Torizon OS on the Verdin i.MX8MP and have built a workflow around neural network inference using the NPU. Specifically, we put together:

  • A reusable base Docker image (* torizon-tflite-npu-base) inspired by the tflite-rtsp sample recipes, which bundles tflite_runtime, TIM-VX + VX delegate for the i.MX8MP NPU, libovxlib, and OpenCV with GStreamer support.
  • A demo camera application (* torizon-tflite-npu-camera-app) built on top of that base image. The detection logic is identical to the tflite-rtsp sample, the only difference is the output: instead of streaming over RTSP, frames are written to a GStreamer display sink.

This has worked really well for streamlining application development on the i.MX8MP, so we’re now looking to replicate the same approach on the Luna SL1680.

The SL1680 has a more capable NN accelerator, and we’d love to build a similar base image for it. Our question is:

Are there equivalent recipes or scripts available for the SL1680 to install the corresponding ML inference dependencies (TFLite runtime, the appropriate NPU delegate/driver stack, and OpenCV with GStreamer)? Or is there existing community or official work in this direction that we could build on?

Any pointers to relevant documentation, BSP packages, or sample projects would be greatly appreciated!

Thanks in advance.

Kind regards,

Kadir Güzel

VoXel e.U. | Kadir Güzel
DI Dr.techn. Simon Vogl | kadir.guzel@voxel.at
Tomaschekweg 46 | www.voxel.at
A-4040 Linz - Austria |
Office address: Industriezeile 35, 4020 Linz (2nd floor)

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help you explore the Luna SL1680 for your machine learning applications! Before I can provide specific guidance on the ML inference dependencies and NPU acceleration setup, could you let me know which OS and version you are planning to use on the Luna SL1680?

To get detailed information about your setup, you can use the tdx-info command. More details about this tool are available at: tdx-info documentation.

About Luna SL1680

The Luna SL1680 is indeed a powerful platform for Edge AI applications(1). It features an 8 TOPS (dense, INT8) NPU, ready for on-device AI(1), along with ISP + VPU for video and image processing(1). The platform is integrated with Toradex’s VSCode Extension, enabling convenient development tools with zero setup time(1).

Available ML Framework Support

Based on the available documentation, here’s what I can share about ML frameworks on Toradex platforms:

For Torizon OS

  • OpenCV: Torizon provides Debian Docker images with OpenCV support for computer vision applications(2)
  • TensorFlow Lite: Available for NPU acceleration on supported i.MX platforms(3)

For Yocto BSP

The Toradex BSP includes support for various AI runtimes through the meta-imx-ml layer(4):

  • TensorFlow Lite v2.16.2(4)
  • Onnxruntime 1.17.1 (CPU only)(4)
  • Pytorch 2.0.0 (CPU only)(4)
  • OpenCV 4.6.0 (CPU only)(4)

Once you clarify which OS version you’re planning to use, I can provide more specific guidance on setting up the ML inference stack for the Luna SL1680’s NPU capabilities.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Greetings @Kadir,

Currently we don’t have much anything to share regarding the enablement of the NPU on the Luna. However, this is something that is currently in progress by our team.

That said, just recently we published a Dockerfile for a tensorflow based container for the SL1680: torizon-containers/platform-specific/sl1680/tensorflow/Dockerfile at stable · torizon/torizon-containers · GitHub

Perhaps you can use this as a starting point for now, depending on your end goals.

Best Regards,
Jeremias

1 Like

Hi @jeremias.tx,

Thank you for the pointer. That Dockerfile was exactly what we needed to get started!

Using it as a base, we successfully ported both our torizon-tflite-npu-base image and the torizon-tflite-npu-camera-app to the Luna SL1680. Both the base image and the demo application are working well. With NPU support enabled, we’re seeing an inference time of ~0.005 seconds for object detection, which is very promising.

We’ve made the work available here in case it’s useful to others in the community or as a reference for the ongoing enablement work on your end:

We’d also be happy to contribute this back to torizon-containers if that would be of interest to the team.

Thanks again for the quick and helpful response!

Kind regards,
Kadir Güzel

That’s good to here you were able to get your application working on the Luna. Thank you for sharing your work as well. This is very helpful for us and our community at large.

Best Regards,
Jeremias