# Choosing a Kernel Backend

import CapabilityMatrix from "../../../../components/CapabilityMatrix.astro";

TiGrIS plans are target-independent. The backend selected with `tigris codegen`
chooses the kernels used by the generated integration code; it does not change
the model or plan format.

For initial integration and host testing, use `reference`. For an int8 deployment,
select `esp-nn` on ESP32-S3 or `cmsis-nn` on Cortex-M. Both accelerated backends
fall back to TiGrIS's portable int8 kernels when a vendor kernel cannot preserve
the plan's semantics. Float32 operators inside an int8 plan use the portable
float kernels on either backend.

## At a glance

| `--backend` | Intended target | Float32 plan | Int8 plan |
|---|---|---|---|
| `reference` | POSIX, tests, portable deployments | Portable C | Portable C |
| `esp-nn` | ESP32-S3 | Portable C | ESP-NN with portable fallback |
| `cmsis-nn` | Arm Cortex-M | Portable C | CMSIS-NN with portable fallback |

ESP-NN and CMSIS-NN accelerate int8 only. Selecting either for a float32 plan
explicitly uses the portable float implementation.

## Supported operators

The table covers the plan operators that remain after TiGrIS normalizes an
ONNX graph or converts a TFLite model; TFLite operator names and their limits
are in [Compiling a TFLite Model](/0.12.0/guides/tflite-models/). **Native** means the vendor library is normally used. **Portable
fallback** remains supported but does not receive vendor acceleration. The
ESP-NN and CMSIS-NN columns describe int8 routes; float sections use the
portable float32 route.

<CapabilityMatrix mode="matrix" />

## Important operator limits

The matrix uses the runtime's NLC/NHWC layouts. For rank-3 and rank-4 ONNX
activations, the channel axis becomes the runtime's final dimension; this is
the supported Softmax axis.

<CapabilityMatrix mode="limits" />

## When native acceleration falls back

An asterisk in the support table means the vendor adapter is used for the
common case, while these variants deliberately take the portable int8 path:

<CapabilityMatrix mode="fallbacks" />

## Operators not directly executable

These names have reserved plan opcodes but no kernel route. Normalization may
fold or rewrite some of them; code generation rejects a plan if one remains:

<CapabilityMatrix mode="unsupported" />

The compiler still validates each model's shapes, attributes, quantization,
tiling, and memory requirements. A listed operator does not imply support for
every ONNX attribute combination.

## Keeping this page accurate

These tables are rendered from the compiler's capability contract,
`operator-capabilities-v1.json`. Compiler and runtime CI check that contract
against the runtime's dispatch tables on every change. This page shows the
contract of the integration branch; each archived version in the version
selector shows the one its release shipped.