Skip to content
v0.9.0

This content is for v0.9.0. Switch to the latest version for up-to-date documentation.

Choosing a Kernel Backend

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.

--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.

The table covers operators that may remain after TiGrIS normalizes an ONNX graph. Native means the vendor library is normally used. Portable fallback remains supported but does not receive vendor acceleration.

Executable operators after graph normalization
OperatorPortable CESP-NN (int8)CMSIS-NN (int8)
ConvFloat32 + int8Native*Native*
DepthwiseConvFloat32 + int8Native*Native*
ReluFloat32 + int8Portable fallbackPortable fallback
Relu6Float32 + int8Portable fallbackPortable fallback
MaxPoolFloat32 + int8Portable fallbackPortable fallback
AveragePoolFloat32 + int8Native*Native*
AddFloat32 + int8Portable fallbackPortable fallback
MulFloat32 + int8Portable fallbackPortable fallback
GemmFloat32 + int8NativeNative
SoftmaxFloat32 + int8Portable fallbackPortable fallback
SigmoidFloat32 + int8Portable fallbackPortable fallback
ConcatFloat32 + int8Portable fallbackPortable fallback
GlobalAveragePoolFloat32 + int8Portable fallbackNative*
FlattenFloat32 + int8Portable fallbackPortable fallback
ReshapeFloat32 + int8Portable fallbackPortable fallback
SubFloat32 + int8Portable fallbackPortable fallback
TanhFloat32 + int8Portable fallbackPortable fallback
ConvTransposeFloat32 + int8Portable fallbackPortable fallback
MatMulFloat32 + int8Portable fallbackPortable fallback
ReduceMeanFloat32 + int8Portable fallbackPortable fallback
TransposeFloat32 + int8Portable fallbackPortable fallback
ResizeFloat32 + int8Portable fallbackPortable fallback
GlobalMaxPoolFloat32 + int8Portable fallbackPortable fallback
Conv1DFloat32 + int8Portable fallbackPortable fallback
LayerNormalizationFloat32 + int8Portable fallbackPortable fallback
ErfFloat32 + int8Portable fallbackPortable fallback
SplitFloat32 + int8Portable fallbackPortable fallback
ResizeLinearFloat32 + int8Portable fallbackPortable fallback
HardSwishFloat32 + int8Portable fallbackPortable fallback

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.

OperatorImplemented form
Relurank-3 pointwise length tiling on serialized axis 1
Relu6rank-3 pointwise length tiling on serialized axis 1
MaxPoolexplicit padding, floor output sizing, unit dilation, and no indices output
AveragePoolexplicit padding, floor output sizing, unit dilation, and count_include_pad=0 wherever padding is non-zero
Adda dynamic second operand has the first operand's shape or holds one value per channel, and a per-channel one runs untiled; a float constant operand is one value, one per channel, or one per element
Addstandalone rank-3 pointwise length tiling on serialized axis 1
Mula dynamic second operand has the first operand's shape or holds one value per channel, and a per-channel one runs untiled; a float constant operand is one value, one per channel, or one per element
Mulstandalone rank-3 pointwise length tiling on serialized axis 1
Softmaxfinal axis only; untiled execution
Sigmoidrank-3 pointwise length tiling on serialized axis 1
Concatrank-3 and rank-4 concatenation on the last stored axis; a constant part only as the leading operand of a float concatenation
GlobalAveragePooluntiled execution
Tanhrank-3 pointwise length tiling on serialized axis 1
ReduceMeanrank-3 mean over serialized axis 1; untiled execution. A rank-4 mean over both spatial axes is rewritten to GlobalAveragePool instead
Transposea concrete, valid permutation is stored in schema 4+ plans
Resizerank-4 nearest-neighbor integer H/W upscaling; height tiling as the stage's single spatial op, never in a chain
Conv1Dstandalone rank-3 length tiling on serialized axis 1; may compose with shape-preserving unary pointwise operators
Splitcontiguous parts along the outermost stored axis; untiled execution
ResizeLinearrank-4 bilinear integer H/W upscaling with half-pixel or asymmetric coordinates; height tiling as the stage's single spatial op, never in a chain
HardSwishrank-3 pointwise length tiling on serialized axis 1

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:

BackendOperatorFallback condition
cmsis-nnConvfalls back for dilation other than 1
esp-nnConvfalls back for dilation other than 1; asymmetric padding falls back when its preparation-time workspace is insufficient
cmsis-nnDepthwiseConvfalls back for dilation other than 1
esp-nnDepthwiseConvfalls back for dilation other than 1
cmsis-nnAveragePoolfalls back when tiled or when input/output quantization differs
esp-nnAveragePoolfalls back when tiled or when input/output quantization differs
cmsis-nnGlobalAveragePoolfalls back when tiled or when input/output quantization differs

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:

Clip, Pad, Div, LeakyRelu, BatchNormalization, InstanceNormalization, Squeeze, Unsqueeze.

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.

These tables describe the currently released tigris-ml package. They are generated from its capability contract and automatically verified against the published package for every website release. Development CI separately checks the next documentation state against compiler and runtime develop.