I.MX93 NPU

From embeddedTS Manuals

The i.MX93 includes an ARM Ethos-U65 NPU to support accelerating neural networks for AI applications.

Features:

  • 256 MACs operating up to 1GHz and 2 OPS/MAC
  • Targets 8-bit and 16-bit integer RNN
  • Handles 8-bit weights

The NPU requires use of the onboard m33 microcontroller to run firmware to manage the NPU.

The software support involves a staging kernel driver providing /dev/ethosu, and a userspace stack that connects to this to run inference.

These steps are still in development and are not functional yet

First, download the ethos firwmare to the boot image:

mkdir /boot/aux/
cd /boot/aux/
git clone https://github.com/nxp-imx/ethos-u-firmware.git -b lf-6.6.3_1.0.0

Then update your /boot/boot.scr to load the required firmware. Add this at the beginning of /boot/source:

load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} /boot/aux/ethos-u-firmware/ethosu_firmware
cp.b ${loadaddr} 0x201e0000 0x20000
bootaux 0x1ffe0000

This will copy this code into the m33's memory and start it. Boot back up to linux and install the driver stack:

git clone https://github.com/nxp-imx/ethos-u-driver-stack-imx.git -b lf-6.6.3_1.0.0
# Install build requirements
apt-get update
apt-get install cmake build-essential libflatbuffers-dev -y

# Build
mkdir build
cd build
cmake ../
make -j2