Open chadrockey opened 2 weeks ago
Thank you for the issue.
However, I don't think the delegate or other required libraries are installed.
Is this when running on Raspberry Pi? I was considering supporting GPU Delegate in the Yocto recipe but had not yet started. First, I will check what is missing.
Thanks! This is for a BSP that is not raspberry pi. My OEM has demos that support GPU Delegate in Python, but my application is in C++ and your recipes are much closer to my use case.
Sorry for the late reply.
First, I checked the operation based on https://github.com/NobuoTsukamoto/meta-tensorflow-lite/tree/gpu_delegate. The Benchmark Tool worked correctly on VisionFive 2 (meta-riscv).
It seems that the library is missing on Raspberry Pi 4 (meta-raspberrypi). However, a similar error occurs on Raspberry Pi OS.
I plan to continue checking whether it works with libtensorflowlite.
@NobuoTsukamoto I actually had success with my BSP using commit e74b569e1b5606c6a8357bc80ecdff46fb95102b
This was my libtensorflow-lite_%.bbappend since I'm not on raspberry pi:
RDEPENDS:${PN} += " opencl "
TENSORFLOW_TARGET_ARCH = "aarch64"
EXTRA_OECMAKE:append = " -DTFLITE_ENABLE_XNNPACK=ON"
EXTRA_OECMAKE:append = " -DTFLITE_ENABLE_GPU=ON"
EXTRA_OECMAKE:append = " -DTFLITE_ENABLE_MMAP=ON"
I am on kirkstone but I pulled in abseil-cpp and flat buffers from main of open embedded.
My GPU Delegate worked fine from the tf lite cmake installation instructions. So all that was needed was this bbappend and the following c++ code to actually use the GPU Delegate:
auto* delegate = TfLiteGpuDelegateV2Create((/*default options=*/nullptr);
builder.AddDelegate(delegate);
Hi, it seems like adding TFLITE_ENABLE_GPU via bbappend via -DTFLITE_ENABLE_GPU=ON seems to build correctly for me.
However, I don't think the delegate or other required libraries are installed. Do you have any insight on what's required to correctly support this flag similar to the direct cmake instructions: https://www.tensorflow.org/lite/guide/build_cmake#step_4_run_cmake_tool_with_configurations