|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
First-party TFLite-micro Ethos-U custom-op registration probe (RA8P1-only). More...
#include "ra8_device.h"Go to the source code of this file.
First-party TFLite-micro Ethos-U custom-op registration probe (RA8P1-only).
The first-party ra8_ethosu_kernel.cc provides the real TFLite-micro tflite::Register_ETHOSU() operator – replacing the vendored portable stub that returned nullptr – and dispatches the Ethos-U55 command stream to the NPU through the ra8_ethosu_shim / ra8_npu driver. That kernel is C++ and only compiles inside a RA8_USE_TFLITE_MICRO build (it needs the vendored TFLite include tree), so it is built by cmake/tflite_micro.cmake, NOT by the always-globbed ra8_hal C source set.
This tiny C-callable header exposes ONE probe, ::ra8_ethosu_kernel_available, so a plain C application (which cannot include the C++ TFLite headers) can assert that the real Ethos-U operator is wired: that Register_ETHOSU() returns a non-NULL registration whose invoke and custom_name are set. It is the C entry point an examples/ra8p1_foundation app uses to prove the TFLite-micro <-> NPU integration links and registers, independent of a full Vela-compiled model run (which needs the offline Vela compiler, a follow-up).
RA8P1-only: guarded behind RA8_HAS_NPU exactly like ra8_npu.h / ra8_ethosu_shim.h. On a device without an NPU this header declares nothing and the matching kernel's Register_ETHOSU() returns nullptr (the CPU-only TFLite path), so nothing here applies.
Definition in file ra8_ethosu_kernel.h.