Skip to main content

Model compatibility

The SiMa.ai compilation toolchain imports ONNX models and prepares operators for the Machine Learning Accelerator (MLA). Use this page to check operator support before you prepare a model for Modalix.

Supported operators​

Search the table to check MLA compiler support by operator and precision scheme. INT8 runs on the MLA. BF16 is available on Modalix (developer preview). 5D marks operators that accept 5D (N, D, H, W, C) tensors. Opset is the ONNX opset version. Search matches constraint text as well as operator names, and each operator links to its reference on onnx.ai.

75 of 75 operators
Abs✅✅—13
Add✅✅—14
ArgMax✅✅—13
AveragePool✅✅—11
BatchNormalization———15
Clip✅✅—13
Concat✅✅✅13
Conv✅✅✅11
ConvTranspose✅✅✅11
Cos✅❌✅22
CumSum———14
DepthToSpace✅✅—13
Div✅✅—14
Einsum✅✅—12
Elu✅✅—6
Erf✅✅—13
Exp✅✅—13
Expand✅✅✅13
Flatten✅✅—21
Gather✅✅—13
Gelu✅✅—20
Gemm✅✅—13
GlobalAveragePool✅✅—13
GlobalLpPool✅❌—22
GlobalMaxPool✅✅—13
GridSample❌✅—16
HardSigmoid✅✅—6
HardSwish✅✅—14
InstanceNormalization✅✅✅6
LayerNormalization✅✅—17
LeakyRelu✅✅—16
Log✅❌—13
LogSoftmax✅❌—13
LpPool✅❌—22
LRN✅❌—13
MatMul✅✅—13
MaxPool✅✅—12
Mean✅❌—13
MeanVarianceNormalization✅❌❌13
Mish✅❌—22
Mul✅✅—14
Neg✅✅—13
Pad✅✅—13
Pow✅✅✅15
PRelu✅✅—16
Reciprocal✅✅—13
ReduceL1✅✅—17
ReduceL2✅✅—18
ReduceLogSum✅❌—17
ReduceLogSumExp✅❌—17
ReduceMax✅✅—13
ReduceMean✅✅—13
ReduceMin❌❌—13
ReduceSum✅✅—13
ReduceSumSquare✅✅—17
Relu✅✅—14
Reshape✅✅✅14
Resize✅✅—13
Sigmoid✅✅—13
Sin✅❌✅22
Slice✅✅—13
Softmax✅✅—13
Softplus✅✅—1
Softsign✅✅—22
SpaceToDepth✅✅—13
Split✅✅—13
Sqrt✅❌—13
Squeeze✅✅—21
Sub✅✅—14
Sum✅✅—13
Tanh✅✅—13
Tile✅✅—13
TopK✅✅—11
Transpose✅✅—13
Unsqueeze✅✅—21

Constraints​

These operators are supported with the limits below. Operators not listed here have no additional constraints. Where a constraint names an ONNX attribute, set it accordingly when you export the model.

  • Add — Same shape, or exactly one input is a scalar, or both inputs are broadcastable
  • ArgMax — Output is int32 (HW has no int64)
    axis = channel axis only (SW)
  • AveragePool — count_include_pad = 1 (HW)
    kernel_shape: If global pool, no size limit; otherwise size < 128. (HW. Workaround by SW)
    dilations = 1 for newer opset (HW)
  • BatchNormalization — training_mode = 0 (SW)
  • Concat — Not on batch axis
  • Conv — dilation = [1, 63] (HW)
    strides = [1, 31] (HW)
  • ConvTranspose — dilations == 1 (HW)
    group = 1 (HW) or depthwise (SW)
    stride = [1, 2, 4, 8, 16] non-depthwise; [1, 2] depthwise (SW)
  • Cos — INT8 activation only. A bfloat16 activation request inserts casts and executes Cos as an INT8 lookup-table UDF.
  • CumSum — reverse = 0 (SW)
    Size <= 257 on summation axis. (SW)
    Must have exactly one summation axis. (SW)
    Axis must be a constant. (HW)
  • Div — Same shape, or exactly one input is a scalar, or both inputs are broadcastable
  • Einsum — Must have two input tensors. (SW)
    Supports any equation where each variable is used in at least two tensors and at most once in each tensor. An example violating the first condition is jk,k->k (j is not used in at least two tensors). An example violating the second condition is jk,kk->j (k is used twice in one tensor). (SW)
  • Expand — Shape must be compile-time constant and broadcast-compatible. Batch dimension cannot be broadcast or changed. (SW)
  • Flatten — axis = 1 so the batch dimension is preserved. Input and output must be at least 2D. (SW)
  • Gather — indices must be a scalar compile-time constant. The imported Take must have an axis so it can be rewritten to StridedSlice. Runtime or 1D indices and direct Take execution are not supported on MLA. (SW)
  • Gelu — approximate = "none" (SW)
  • Gemm — A and B must be rank-2. B must be a compile-time constant initializer; a runtime B input is unsupported and fails before backend partitioning. alpha and beta may be finite floating-point values. transB = 0 or 1 is supported. transA = 1 requires flexible_batch_size=False because the leading dimension of A is K rather than batch. Optional constant C supports scalar, [N], [1,N], or [M,N]; constant [M,1] is unsupported. A runtime C remains entirely on MLA only for [1,N], [M,1], or [M,N]; runtime scalar or [N] C uses APU fallback.
  • GlobalLpPool — p = 2. Static input shape. Input rank = 3, 4, or 5. (SW)
  • GridSample — Limited kernel for RaftStereo: sampling on W axis only. (SW)
    mode = 'linear'
    padding_mode != 'reflection'
  • InstanceNormalization — Only for 4D and 5D tensors. (SW)
  • LayerNormalization — stash_type = 10 (FLOAT16) not supported. (SW)
  • LogSoftmax — Input and output must be at least 2D. (SW)
  • LpPool — p = 2. dilation = 1. ceil_mode = 0. Static shapes. Kernel size < 128 in every spatial dimension unless the pool is global. (HW/SW)
  • MaxPool — dilations = 1 (HW)
    kernel_shape: If global pool, no size limit; otherwise size < 128. (HW)

    storage_order: No optional indices tensor output (SW)
  • Mean — All inputs have the same shape and batch dimension. Fewer than 128 inputs. (SW/HW)
  • MeanVarianceNormalization — INT8 activation only. A bfloat16 activation request inserts casts, but sqrt/rsqrt and some reduction paths still execute as INT8. Rank-5 (3D spatial) axis handling is layout-pattern dependent and is not generally supported; use rank 4 or lower for portable MLA support. The selected axes must produce nonzero variance because this ONNX operator has no epsilon attribute.
  • Mul — Same shape, or exactly one input is a scalar, or both inputs are broadcastable
  • Pad — mode: only ‘constant’ mode with value 0. (SW)
    At most 2 dimensions may have a nonzero padding width. (SW)
  • Pow — Input exponent is scalar constant 0.5, -0.5, 2, or 3. (SW)
  • PRelu — 1D alpha. (SW)
  • ReduceL1 — Use ONNX opset <= 17 so axes are an attribute. If reducing a subset of spatial axes, each reduced extent must be < 128; reducing all spatial axes has no size limit. (SW/HW)
  • ReduceL2 — Expect following DIV to merge to L2 normalization.
  • ReduceLogSum — Use ONNX opset <= 17 so axes are an attribute. If reducing a subset of spatial axes, each reduced extent must be < 128; reducing all spatial axes has no size limit. Reduced sums must be in the Log domain. (SW/HW)
  • ReduceLogSumExp — Use ONNX opset <= 17 so axes are an attribute. If reducing a subset of spatial axes, each reduced extent must be < 128; reducing all spatial axes has no size limit. (SW/HW)
  • ReduceMean — For 1D reduce, axis is spatial dimension only. (SW)
    If all spatial axes, no size limit; otherwise, size in spatial axes less than 128. (HW)
  • ReduceMin — Not supported yet. (SW)
  • ReduceSum — For 1D reduce, axis is spatial dimension only. (SW)
    If all spatial axes, no size limit; otherwise, size in spatial axes less than 128. (SW)
  • ReduceSumSquare — Use ONNX opset <= 17 so axes are an attribute. If reducing a subset of spatial axes, each reduced extent must be < 128; reducing all spatial axes has no size limit. (SW/HW)
  • Reshape — allowzero = 0 (SW)
    Shape cannot be empty. (SW)
  • Resize — mode = [nearest, linear] (HW/SW)
    coordinate_transformation_mode= 'tf_crop_and_resize' not supported. (SW)
    If method is 'linear', any scaling factor is supported. However,
    for 8-bit integers any scaling more than 63 may lead to loss in accuracy. (HW)
    If the method is 'nearest', then the scaling factor must be a power of two (HW), or the scaling factor must be an even integer (using the same factor in both dimensions) and the coordinate transformation mode must be half_pixel and the rounding mode must be floor. (SW)
    Any other method or scaling factor is not supported.

    Single input only. (SW)
  • Sin — INT8 activation only. A bfloat16 activation request inserts casts and executes Sin as an INT8 lookup-table UDF.
  • Slice — Positive strides. (SW)
  • Softmax — Over channel axis
  • Squeeze — Axes input must be compile-time constant, may select only dimensions of size 1, and cannot remove the batch axis. Output must be at least 2D. (SW)
  • Sub — Same shape, or exactly one input is a scalar, or both inputs are broadcastable
  • Sum — All inputs have the same rank and batch dimension. Other dimensions are equal or 1. (SW)
  • Tile — Repeats must be compile-time constant and the batch-axis repeat must be 1. Input and output must be at least 2D. (SW)
  • TopK — K must be compile-time constant, 1 <= K < selected-axis size, and largest = 1. Input and outputs must be at least 2D. ONNX int64 indices are emitted as int32 because MLA has no int64. (SW/HW)
  • Transpose — Not involving batch axis
  • Unsqueeze — Axes input must be compile-time constant and cannot insert a new batch axis. Input and output must be at least 2D. (SW)