Coral NPU Full Stack Documentation
The Coral NPU stack spans three repositories that together form a complete pipeline for compiling and running ML models on Google’s Coral Neural Processing Unit:
| Component | Purpose | Language |
|---|---|---|
SKaiNET |
Type-safe tensor DSL, computation graph construction, StableHLO MLIR export, optimization passes |
Kotlin Multiplatform |
iree-tools |
StableHLO MLIR parser, C code generator, Bazel integration, simulator driver |
Python (uv) |
coralnpu |
Hardware design (Chisel/Verilog), Bazel cross-compiler toolchain, MPACT behavioral simulator, bare-metal CRT |
C / SystemVerilog / Python |
Documentation Structure (Diataxis)
This documentation follows the Diataxis framework:
- Explanation (understanding-oriented)
-
Deep technical analysis of why the architecture works the way it does. Written for experienced ML engineers and data scientists who need to understand the compilation pipeline, hardware constraints, and design trade-offs.
Start here if you want to understand the full stack.
- Tutorials (learning-oriented)
-
Step-by-step walkthroughs that take you from zero to a running model on the simulator. Follow along exactly to build working results.
Grayscale to Simulator — the canonical end-to-end example.
- How-to Guides (task-oriented)
-
Concise recipes for specific tasks. Assumes you understand the basics and need to accomplish something concrete. Targeted at Android/Java developers integrating with the stack.
Set Up Java/Android Dev Environment is a good starting point for Android developers.
- Reference (information-oriented)
-
Precise technical specifications — ISA details, memory maps, CLI flags, module inventories. Consult when you need exact values.
iree-tools CLI Reference documents every subcommand.
Quick Start
# 1. Export StableHLO MLIR from SKaiNET
cd SKaiNET
./gradlew :skainet-apps:skainet-grayscale-cli:run \
--args="--input photo.jpg --model RGB2GRAYSCALE --verbose"
# 2. Transpile MLIR to C, build ELF, run on simulator
cd ../iree-tools
uv run python main.py run-all rgb2grayscale.mlir
Prerequisites
| Tool | Version | Install |
|---|---|---|
|
Latest |
|
|
Latest |
|
JDK |
21+ |
|
Bazel |
7.4.1 |
Via Bazelisk: |
Python |
3.11+ |
Managed by |