Skip to Content
🎉 WebNN Developer Preview is released →
ReferenceONNX RuntimeWebNN EP Ops

WebNN Supported Operators in ONNX Runtime

This table documents the ONNX operators supported by WebNN EP in ONNX Runtime Web. The Opset column indicates support for versions 7 through 12, plus version 13 and above.

ONNX Runtime guarantees support only for models using opset version 7 or higher in the ‘ai.onnx’ domain.

OperatorOpsetWebNN APIWebNN CPUWebNN GPUComments
Absai.onnx (7-12, 13+)abs
Addai.onnx (7-12, 13, 14+)add
Andai.onnx (7+)logicalAnd
ArgMaxai.onnx (7-10, 11, 12, 13+)argMax
ArgMinai.onnx (7-10, 11, 12, 13+)argMin
AveragePoolai.onnx (7-9, 10, 11, 12-18, 19+)averagePool2dOnly supports 4-D input, 2-D ‘kernel_shape’, ‘count_include_pad’ value is 0
BatchNormalizationai.onnx (7-8, 9-13, 14, 15+)batchNormalizationOnly supports ‘training_mode’ value is 0, one output
Castai.onnx (7-8, 9-12, 13-18, 19-20, 21+)castWebNN CPU backend doesn’t support casting to uint64 data type
Ceilai.onnx (7-12, 13+)ceil
Clipai.onnx (7-10, 11, 12, 13+)clampWebNN CPU backend only supports 3 specific ranges: [0.0, infinity], [-1.0, 1.0], [0.0, 6.0] (Chromium issue: https://issues.chromium.org/issues/326156496)
Concatai.onnx (7-10, 11-12, 13+)concat
Convai.onnx (7-10, 11+)conv2dOnly supports 3-D or 4-D input and ‘W’ (weight)
ConvTransposeai.onnx (7-10, 11+)convTranspose2dOnly supports 3-D or 4-D input and ‘W’ (weight). WebNN CPU backend only supports default dilations and group
Cosai.onnx (7+)cos
CumSumai.onnx (11-13, 14+)cumulativeSum‘axis’ input should be a constant
Divai.onnx (7-12, 13, 14+)div
DequantizeLinearai.onnx (10-12, 13-18, 19-20, 21-22, 23+)dequantizeLinearThe shape of x_scale should be a subsample of the shape of input
Dropoutai.onnx (7-9, 10-11, 12, 13-21, 22+)identityOnly supports test mode
Einsumai.onnx (12+)reshape, transpose, matmul, reduceSum, mul, triangular
Eluai.onnx (7+)eluWebNN CPU backend only supports ‘alpha’ value is 1.0
Equalai.onnx (7-10, 11-12, 13-18, 19+)equal
Erfai.onnx (7-9, 10-12, 13+)erf
Expai.onnx (7-12, 13+)exp
Expandai.onnx (8-12, 13+)expand‘shape’ input should be a constant
Flattenai.onnx (7-8, 9-10, 11-12, 13-20, 21+)reshape
Floorai.onnx (7-12, 13+)floor
Gatherai.onnx (7-10, 11-12, 13+)gather
GatherElementsai.onnx (11-12, 13+)gatherElements
GatherNDai.onnx (11, 12, 13+)gatherNDOnly supports ‘batch_dims’ == 0
Geluai.onnx (20+)gelu
Gemmai.onnx (7-8, 9-10, 11-12, 13+)gemmOnly supports 1-D ‘C’ input
GlobalAveragePoolai.onnx (7+)averagePool2dOnly supports 4-D input
GlobalMaxPoolai.onnx (7+)maxPool2dOnly supports 4-D input
GlobalLpPoolai.onnx (7+)l2Pool2dOnly supports 4-D input, ‘p’ value is 2
Greaterai.onnx (7-8, 9-12, 13+)greater
GreaterOrEqualai.onnx (12-15, 16+)greaterOrEqual
GRUai.onnx (7-13, 14-21, 22+)gruOnly supports ‘layout’ == 0. ‘clip’ is not supported. The activation functions in ‘activations’ must be one of ‘Relu’, ‘Tanh’, ‘Sigmoid’. Forward and backward activations must be the same if bidirectional. ‘sequence_lens’ if present should be constant with values equal to the first dimension length of input ‘X’
HardSigmoidai.onnx (7+)hardSigmoid
HardSwishai.onnx (14+)hardSwish
Identityai.onnx (7-13, 14-15, 16-18, 19-20, 21+)identity
InstanceNormalizationai.onnx (7+)instanceNormalization
LayerNormalizationai.onnx (7-16, 17+)layerNormalization
LeakyReluai.onnx (7-15, 16+)leakyRelu
Lessai.onnx (7-8, 9-12, 13+)lesser
LessOrEqualai.onnx (12-15, 16+)lesserOrEqual
Logai.onnx (7-12, 13+)log
LpPoolai.onnx (7-10, 11-17, 18+)l2Pool2dOnly supports 4-D input, 2-D ‘kernel_shape’, ‘p’ value is 2
LRNai.onnx (7-12, 13+)pad, averagePool2d, transpose, add, mul, pow, div
LSTMai.onnx (7-13, 14-21, 22+)lstmOnly supports ‘layout’ == 0, ‘input_forget’ == 0. ‘clip’ is not supported. The activation functions in ‘activations’ must be one of ‘Relu’, ‘Tanh’, ‘Sigmoid’. Forward and backward activations must be the same if bidirectional. ‘sequence_lens’ if present should be constant with values equal to the first dimension length of input ‘X’
MatMulai.onnx (7-8, 9-12, 13+)matmul
Maxai.onnx (7, 8-11, 12, 13+)max
MaxPoolai.onnx (7, 8-9, 10, 11, 12+)maxPool2dOnly supports 4-D input, 2-D ‘kernel_shape’, ‘storage_order’ != 1, one output
Minai.onnx (7, 8-11, 12, 13+)min
Mulai.onnx (7-12, 13, 14+)mul
Negai.onnx (7-12, 13+)neg
Notai.onnx (7+)logicalNot
Orai.onnx (7+)logicalOr
Padai.onnx (7-10, 11-12, 13-17, 18, 19-20, 21+)padmodes == ‘wrap’ is not supported
Powai.onnx (7-11, 12, 13-14, 15+)pow
PReluai.onnx (7-8, 9-15, 16+)preluWebNN CPU backend restricts the last dimension of input and slope to be same (Chromium issue: https://issues.chromium.org/issues/335517470)
QuantizeLinearai.onnx (10-12, 13-18, 19-20, 21-22, 23+)quantizeLinearThe shape of x_scale should be a subsample of the shape of input
Reciprocalai.onnx (7-12, 13+)reciprocal
ReduceL1ai.onnx (7-10, 11-12, 13-17, 18+)reduceL1Input ‘axes’ if present should be a constant
ReduceL2ai.onnx (7-10, 11-12, 13-17, 18+)reduceL2Input ‘axes’ if present should be a constant
ReduceLogSumai.onnx (7-10, 11-12, 13-17, 18+)reduceLogSumInput ‘axes’ if present should be a constant
ReduceLogSumExpai.onnx (7-10, 11-12, 13-17, 18+)reduceLogSumExpInput ‘axes’ if present should be a constant
ReduceMaxai.onnx (7-10, 11, 12, 13-17, 18-19, 20+)reduceMaxInput ‘axes’ if present should be a constant
ReduceMeanai.onnx (7-10, 11-12, 13-17, 18+)reduceMeanInput ‘axes’ if present should be a constant
ReduceMinai.onnx (7-10, 11, 12, 13-17, 18-19, 20+)reduceMinInput ‘axes’ if present should be a constant
ReduceProdai.onnx (7-10, 11-12, 13-17, 18+)reduceProductInput ‘axes’ if present should be a constant
ReduceSumai.onnx (7-10, 11-12, 13+)reduceSumInput ‘axes’ if present should be a constant
ReduceSumSquareai.onnx (7-10, 11-12, 13-17, 18+)reduceSumSquareInput ‘axes’ if present should be a constant
Reluai.onnx (7-12, 13, 14+)relu
Reshapeai.onnx (7-12, 13, 14-18, 19-20, 21+)reshapeInput ‘shape’ should be a constant, 0 dimension value in ‘shape’ is not supported
Resizeai.onnx (11-12, 13-17, 18, 19+)resample2dOnly supports 4-D input, antialias == 0, exclude_outside == 0, keep_aspect_ratio_policy == ‘stretch’, ‘linear’ and ‘nearest’ modes, input ‘scales’ and ‘sizes’ if present must be a constant
RotaryEmbeddingcom.microsoft(1+)add, concat, gather, mul, reshape, split
ScatterElementsai.onnx (11-12, 13-15, 16-17, 18+)scatterElementsOnly supports ‘reduction’ == ‘none’
ScatterNDai.onnx (11-12, 13-15, 16-17, 18+)scatterNDOnly supports ‘reduction’ == ‘none’
Shapeai.onnx (7-12, 13-14, 15-18, 19-20, 21+)slice
SimplifiedLayerNormalizationai.onnx (1+)pow, reduceMean, add, sqrt, div, mul
Sigmoidai.onnx (7-12, 13+)sigmoid
Signai.onnx (9-12, 13+)sign
SkipSimplifiedLayerNormalizationcom.microsoft(1+)pow, reduceMean, add, sqrt, div, mul
Softplusai.onnx (7+)softplus
Softsignai.onnx (7+)softsign
Sinai.onnx (7+)sin
Sliceai.onnx (7-9, 10, 11-12, 13+)slice, reverseInput ‘starts’, ‘ends’, ‘axes’, and ‘steps’ if present must be a constant
Softmaxai.onnx (7-10, 11-12, 13+)softmax
Splitai.onnx (7-10, 11-12, 13-17, 18+)splitInput ‘split’ if present should be a constant
Sqrtai.onnx (7-12, 13+)sqrt
Squeezeai.onnx (7-10, 11-12, 13-20, 21+)reshapeInput ‘axes’ if present should be a constant
Subai.onnx (7-12, 13, 14+)sub
Tanai.onnx (7+)tan
Tanhai.onnx (7-12, 13+)tanh
Tileai.onnx (7-12, 13+)tileInput ‘repeats’ should be a constant
Transposeai.onnx (7-12, 13-20, 21+)transpose
Triluai.onnx (14+)triangularInput ‘k’ (option ‘diagonal’ for WebNN) if present should be a constant
Unsqueezeai.onnx (7-10, 11-12, 13-20, 21+)reshape
Whereai.onnx (7-8, 9-15, 16+)where
Xorai.onnx (7+)logicalXor
Last updated on