Supported ONNX operators
Barracuda currently supports the following ONNX operators and parameters. If an operator is not on the list and you need it, please create a ticket on the Unity Barracuda GitHub.
Operations
- Add
- And
- ArgMax
- ArgMin
- AveragePool
- BatchNormalization
- Cast
- Concat
- Constant
- ConstantOfShape
- Conv
- ConvTranspose
- DepthToSpace
- Div
- Dropout
- Equal
- Expand
- Flatten
- Gather
- Gemm
- GlobalAveragePool
- GlobalMaxPool
- Greater
- Identity
- ImageScaler
- InstanceNormalization
- Less
- LessOrEqual
- LRN
- LSTM (ML-Agents models only)
- MatMul
- Max
- MaxPool
- Mean
- Min
- Mul
- Multinomial
- NonMaxSuppression
- NonZero
- Not
- OneHot
- Or
- Pad
- Pow
- RandomNormal
- RandomNormalLike
- RandomUniform
- RandomUniformLike
- ReduceMax
- ReduceMean
- ReduceMin
- ReduceProd
- ReduceSum
- Reshape
- Resize
- Shape
- Slice
- SpaceToDepth
- Split
- Squeeze
- Sub
- Sum
- Tile
- TopK
- Transpose
- Unsqueeze
- Upsample
- Where
- Xor
Activations
- Abs
- Acos
- Acosh
- Asin
- Asinh
- Atan
- Atanh
- Ceil
- Clip
- Cos
- Cosh
- Elu
- Exp
- Floor
- LeakyRelu
- Log
- LogSoftmax
- Neg
- PRelu
- Reciprocal
- Relu
- Round
- Selu
- Sigmoid
- Sin
- Sinh
- Softmax
- Sqrt
- Tan
- Tanh
Operations details
Add
- ONNX specification
- Maps to Barracuda op: Add
And
- ONNX specification
- Maps to Barracuda op: LogicalAnd
ArgMax
- ONNX specification
- Unsupported attribute: select_last_index
- Maps to Barracuda op: Reduce
ArgMin
- ONNX specification
- Unsupported attribute: select_last_index
- Maps to Barracuda op: Reduce
AveragePool
- ONNX specification
- Unsupported attribute: ceil_mode, count_include_pad
- Maps to Barracuda op: AvgPool2D
- Notes: No spatial 3D support.
BatchNormalization
- ONNX specification
- Maps to Barracuda op: ScaleBias
Cast
- ONNX specification
- Maps to Barracuda op: Identity
- Notes: No-op during inference.
Concat
- ONNX specification
- Maps to Barracuda op: Concat
- Notes: GPU path support up to 4D, will fallback to CPU if tensors have more dimensions.
Constant
- ONNX specification
- Unsupported attribute: sparse_value
- Maps to Barracuda op: Const
ConstantOfShape
- ONNX specification
- Maps to Barracuda op: Const
Conv
- ONNX specification
- Maps to Barracuda op: DepthwiseConv2D, Conv2D, Conv3D
- Notes: Depthwise convolution 3D not supported.
ConvTranspose
- ONNX specification
- Unsupported attribute: dilatations, group, output_shape
- Maps to Barracuda op: Conv2DTrans
- Notes: No spatial 3D support.
DepthToSpace
- ONNX specification
- Maps to Barracuda op: DepthToSpace
Div
- ONNX specification
- Maps to Barracuda op: Div
Dropout
- ONNX specification
- Maps to Barracuda op: Identity
- Notes: No-op during inference.
Equal
- ONNX specification
- Maps to Barracuda op: Equal
Expand
- ONNX specification
- Maps to Barracuda op: Expand
Flatten
- ONNX specification
- Unsupported attribute: axis
- Maps to Barracuda op: Flatten
Gather
- ONNX specification
- Maps to Barracuda op: Gather
Gemm
- ONNX specification
- Unsupported attribute: alpha, beta, transA
- Maps to Barracuda op: Dense
GlobalAveragePool
- ONNX specification
- Maps to Barracuda op: GlobalAvgPool2D
- Notes: No spatial 3D support.
GlobalMaxPool
- ONNX specification
- Maps to Barracuda op: GlobalMaxPool2D
- Notes: No spatial 3D support.
Greater
- ONNX specification
- Maps to Barracuda op: Greater
Identity
- ONNX specification
- Maps to Barracuda op: Identity
- Notes: No-op during inference.
ImageScaler
- Maps to Barracuda op: ScaleBias
- Notes: Was removed from recent ONNX versions.
InstanceNormalization
- ONNX specification
- Maps to Barracuda op: Normalization
- Notes: Support up to 4D.
Less
- ONNX specification
- Maps to Barracuda op: Less
LessOrEqual
- ONNX specification
- Maps to Barracuda op: LessEqual
LRN
- ONNX specification
- Maps to Barracuda op: LRN
LSTM
- ONNX specification
- Unsupported attribute: activation_alpha
- Unsupported attribute: activation_beta
- Unsupported attribute: activations
- Unsupported attribute: clip
- Unsupported attribute: direction
- Unsupported attribute: input_forget
- Unsupported attribute: activation_beta
- Maps to Barracuda op: LSTM
- Notes: Only ML-Agents models are supported.
See additional information about execution.
MatMul
- ONNX specification
- Maps to Barracuda op: MatMul, Dense
Max
- ONNX specification
- Maps to Barracuda op: Max
MaxPool
- ONNX specification
- Unsupported attribute: ceil_mode, dilatations, storage_order
- Maps to Barracuda op: MaxPool2D
- Notes: No spatial 3D support.
Mean
- ONNX specification
- Maps to Barracuda op: Mean
Min
- ONNX specification
- Maps to Barracuda op: Min
Mul
- ONNX specification
- Maps to Barracuda op: Mul
Multinomial
- ONNX specification
- Maps to Barracuda op: Multinomial
NonMaxSuppression
- ONNX specification
- Maps to Barracuda op: NonMaxSuppression
NonZero
- ONNX specification
- Maps to Barracuda op: NonZero
- Notes: Known bug for non const inputs with at least one dimension of size 1.
Not
- ONNX specification
- Maps to Barracuda op: LogicalNot
OneHot
- ONNX specification
- Unsupported attribute: axis
- Maps to Barracuda op: Onehot
- Notes: Support up to 6D.
Or
- ONNX specification
- Maps to Barracuda op: LogicalOr
Pad
- ONNX specification
- Maps to Barracuda op: Border2D, Border3D, Pad2DReflect, Pad2DEdge
- Notes: Only 'constant' mode have spatial 3D support.
Pow
- ONNX specification
- Maps to Barracuda op: Pow
RandomNormal
- ONNX specification
- Maps to Barracuda op: RandomNormal
RandomNormalLike
- ONNX specification
- Maps to Barracuda op: RandomNormal
RandomUniform
- ONNX specification
- Maps to Barracuda op: RandomUniform
RandomUniformLike
- ONNX specification
- Maps to Barracuda op: RandomUniform
ReduceMax
- ONNX specification
- Maps to Barracuda op: ReduceMax
ReduceMean
- ONNX specification
- Maps to Barracuda op: ReduceMean
ReduceMin
- ONNX specification
- Maps to Barracuda op: ReduceMin
ReduceProd
- ONNX specification
- Maps to Barracuda op: ReduceProd
ReduceSum
- ONNX specification
- Maps to Barracuda op: ReduceSum
Reshape
- ONNX specification
- Maps to Barracuda op: Reshape
Resize
- ONNX specification
- Unsupported attribute: coordinate_transformation_mode, cubic_coeff_a, exclude_outside, extrapolation_value, nearest_mode
- Maps to Barracuda op: Resample2D, Upsample2D, Upsample3D, AvgPool2D
- Notes: No spatial 3D downsampling support.
Shape
- ONNX specification
- Maps to Barracuda op: Const
- Notes: Only support constant shapes.
Slice
- ONNX specification
- Maps to Barracuda op: StridedSlice
SpaceToDepth
- ONNX specification
- Maps to Barracuda op: SpaceToDepth
Split
- ONNX specification
- Maps to Barracuda op: StridedSlice
Squeeze
- ONNX specification
- Maps to Barracuda op: Transpose
Sub
- ONNX specification
- Maps to Barracuda op: Sub
Sum
- ONNX specification
- Maps to Barracuda op: Sum
Tile
- ONNX specification
- Maps to Barracuda op: Tile
TopK
- ONNX specification
- Maps to Barracuda op: TopKIndices,TopKValues
- Notes: Support up to 4D.
Transpose
- ONNX specification
- Maps to Barracuda op: Transpose
Unsqueeze
- ONNX specification
- Maps to Barracuda op: Transpose
Upsample
- ONNX specification
- Maps to Barracuda op: Upsample2D, Upsample3D, AvgPool2D
- Notes: No spatial 3D downsampling support.
Where
- ONNX specification
- Maps to Barracuda op: Where
Xor
- ONNX specification
- Maps to Barracuda op: LogicalXor
Activations details
Abs
- ONNX specification
- Maps to Barracuda op: Abs
Acos
- ONNX specification
- Maps to Barracuda op: Acos
Acosh
- ONNX specification
- Maps to Barracuda op: Acosh
Asin
- ONNX specification
- Maps to Barracuda op: Asin
Asinh
- ONNX specification
- Maps to Barracuda op: Asinh
Atan
- ONNX specification
- Maps to Barracuda op: Atan
Atanh
- ONNX specification
- Maps to Barracuda op: Atanh
Ceil
- ONNX specification
- Maps to Barracuda op: Ceil
Clip
- ONNX specification
- Maps to Barracuda op: Clip
Cos
- ONNX specification
- Maps to Barracuda op: Cos
Cosh
- ONNX specification
- Maps to Barracuda op: Cosh
Elu
- ONNX specification
- Maps to Barracuda op: Elu
Exp
- ONNX specification
- Maps to Barracuda op: Exp
Floor
- ONNX specification
- Maps to Barracuda op: Floor
LeakyRelu
- ONNX specification
- Maps to Barracuda op: LeykyRelu
Log
- ONNX specification
- Maps to Barracuda op: Log
LogSoftmax
- ONNX specification
- Unsupported attribute: axis
- Maps to Barracuda op: LogSoftmax
- Notes: Support up to 6D.
Neg
- ONNX specification
- Maps to Barracuda op: Neg
PRelu
- ONNX specification
- Maps to Barracuda op: PRelu
Reciprocal
- ONNX specification
- Maps to Barracuda op: Reciprocal
Relu
- ONNX specification
- Maps to Barracuda op: Relu
Round
- ONNX specification
- Maps to Barracuda op: Round
Selu
- ONNX specification
- Maps to Barracuda op: Selu
Sigmoid
- ONNX specification
- Maps to Barracuda op: Sigmoid
Sin
- ONNX specification
- Maps to Barracuda op: Sin
Sinh
- ONNX specification
- Maps to Barracuda op: Sinh
Softmax
- ONNX specification
- Maps to Barracuda op: Softmax
- Notes: Support up to 6D.
Sqrt
- ONNX specification
- Maps to Barracuda op: Sqrt
Tan
- ONNX specification
- Maps to Barracuda op: Tan
Tanh
- ONNX specification
- Maps to Barracuda op: Tanh