[中文版|English]
💫 Huixi Intelligence(辉羲智能)rpu (Triton 3.6)
- Based on Triton 3.6, aarch64
The Rhino RPU is the AI accelerator inside Huixi Intelligence's 光至 R1 SoC (rhino.auto). Unlike the CPU/GPU backends, the RPU backend has no preinstalled image and no CPU simulator — it compiles and runs only on a physical R1 SoC board, and its driver, runtime, and toolchain are obtained from the vendor. Build and test directly on the board.
The RPU driver, runtime, and LLVM toolchain are not publicly distributed. Contact Huixi Intelligence (rhino.auto) to obtain them.
- An R1 SoC board running aarch64 Linux that exposes the RPU device node
/dev/rpu(kernel module loaded). - Minimum 24 GB RAM and 60 GB free disk.
- Python 3.10+,
cmake >= 3.20,ninja, and a recentpip.
There is no Docker image for the RPU backend; all steps below run natively on the R1 SoC board. Verify the device node:
ls /dev/rpuInstall, per the vendor's instructions:
- the RPU kernel driver that provides
/dev/rpu; - the
rhino-launch-kernelruntime library (librhino_launch.so), used by the on-board launch_kernel test.
The RPU backend uses a custom LLVM as its .rpubin emitter. Point
RPU_LLVM_ROOT at the toolchain install prefix (the directory containing
bin/clang):
# Toolchain layout:
# $RPU_LLVM_ROOT/bin/clang
# $RPU_LLVM_ROOT/lib/...
export RPU_LLVM_ROOT=/opt/rpu/llvmThe RPU backend is built from source on the board. There is no source-free (pip wheel) installation.
cd ~
git clone https://github.com/flagos-ai/FlagTree.git
cd FlagTree
git checkout mainexport FLAGTREE_BACKEND=rpu
export MAX_JOBS=8 # tune to available RAM
cd ~/FlagTree/python
pip3 install -r requirements.txt # build-time dependencies
cd ~/FlagTree
# Initial build
pip3 install . --no-build-isolation -v
# Rebuild after source changes
pip3 install . --no-build-isolation --force-reinstall -vThe Triton MLIR LLVM is downloaded automatically from the public oaitriton blob the first time setup runs; no manual action is needed.
The compile tests drive the real toolchain, so set RPU_LLVM_ROOT first (the
directory containing bin/clang). If it is unset or its path is missing, the
tests stop with a clear message naming the variable.
cd ~/FlagTree
export RPU_LLVM_ROOT=/opt/rpu/llvm
pytest -s third_party/rpu/python/test/unitThis needs the launch_kernel_runner CLI, a thin front-end over the
rhino-launch-kernel runtime library. Build it together with the backend by
enabling RPU_BUILD_LAUNCH_RUNNER (off by default; it needs the
rhino-launch-kernel install), then run the smoke test on a board with
/dev/rpu:
TRITON_APPEND_CMAKE_ARGS="-DRPU_BUILD_LAUNCH_RUNNER=ON -DCMAKE_PREFIX_PATH=/path/to/rhino-launch-kernel/install" \
pip3 install . --no-build-isolation --force-reinstall -v
export RPU_LK_RUNNER=$PWD/third_party/rpu/tools/launch_runner/launch_kernel_runner
python3 third_party/rpu/python/test/board/lk_board_smoke.py --require-boardIt compiles a small kernel, dispatches it on the device, and compares the result to a numpy golden.
Refer to Tests of rpu backend