Re: [meta-rockchip PATCH v2] add support for upstream RKNPU/RKNN/Rocket HW AI accelerator
Quentin Schulz <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto-patches |
|---|---|
| Message-ID | <[email protected]> |
Hi all, On 4/23/26 6:19 PM, Quentin Schulz wrote: > From: Quentin Schulz <[email protected]> > > This adds support for the NPU (Neural Processing Unit) found on the > RK3588(S). > > The NPU is supported by a kernel driver (CONFIG_DRM_ACCEL_ROCKET), > Device Tree nodes (so not all RK3588 devices supported upstream > necessarily have the NPU declared properly!) and a userspace driver in > mesa (teflon delegate with rocket gallium driver). > > This adds a config fragment for linux-rockchip kernels such that the > disabled-by-default Rocket driver is built and enables the Rocket > gallium mesa driver with the teflon delegate, but only when the user > requests its support. > > This was tested by running the following: > > """ > wget https://gitlab.freedesktop.org/mesa/mesa/-/raw/main/src/gallium/frontends/teflon/tests/classification.py > > TEFLON_DEBUG=verbose python3 classification.py \ > -i /usr/share/label_image/grace_hopper.bmp \ > -m /usr/share/label_image/mobilenet_v1_1.0_224_quant.tflite \ > -l /usr/share/label_image/labels_mobilenet_quant_v1_224.txt \ > -e /usr/lib/libteflon.so > """ > > from an image built with meta-tensorflow's tensorflow-lite, mesa's > libteflon, meta-openembedded's python3-pillow and OE-Core's > python3-numpy packages. > > Note that the Aarch64 RK35xx SoCs all have an NPU, but only RK3588's is > currently supported in the kernel. > > Signed-off-by: Quentin Schulz <[email protected]> > --- > This was tested on RK3588 Jaguar with linux-yocto 6.18 + > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=843b912c7241ed0259f6234243da05e10ce67c0f > > Note this (lightly) depends on > https://lore.kernel.org/yocto-patches/[email protected]/ > being merged in meta-tensorflow. Another option is to simply add This has now merged in meta-tensorflow. Cheers, Quentin