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+)averagePool2d✓✓Only supports 4-D input, 2-D ‘kernel_shape’, ‘count_include_pad’ value is 0
BatchNormalizationai.onnx (7-8, 9-13, 14, 15+)batchNormalization✓✓Only supports ‘training_mode’ value is 0, one output
Castai.onnx (7-8, 9-12, 13-18, 19-20, 21+)cast✓✓WebNN CPU backend doesn’t support casting to uint64 data type
Ceilai.onnx (7-12, 13+)ceil✓✓
Clipai.onnx (7-10, 11, 12, 13+)clamp✓✓WebNN 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+)conv2d✓✓Only supports 3-D or 4-D input and ‘W’ (weight)
ConvTransposeai.onnx (7-10, 11+)convTranspose2d✓✓Only 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+)dequantizeLinear✓✓The shape of x_scale should be a subsample of the shape of input
Dropoutai.onnx (7-9, 10-11, 12, 13-21, 22+)identity✓✓Only supports test mode
Einsumai.onnx (12+)reshape, transpose, matmul, reduceSum, mul, triangular✓✓
Eluai.onnx (7+)elu✓✓WebNN 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+)gatherND✓✓Only supports ‘batch_dims’ == 0
Geluai.onnx (20+)gelu✓✓
Gemmai.onnx (7-8, 9-10, 11-12, 13+)gemm✓✓Only supports 1-D ‘C’ input
GlobalAveragePoolai.onnx (7+)averagePool2d✓✓Only supports 4-D input
GlobalMaxPoolai.onnx (7+)maxPool2d✓✓Only supports 4-D input
GlobalLpPoolai.onnx (7+)l2Pool2d✗✓Only 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+)gru✓✓Only 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+)l2Pool2d✗✓Only 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+)lstm✓✓Only 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+)maxPool2d✓✓Only 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+)pad✓✓modes == ‘wrap’ is not supported
Powai.onnx (7-11, 12, 13-14, 15+)pow✓✓
PReluai.onnx (7-8, 9-15, 16+)prelu✓✓WebNN 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+)quantizeLinear✓✓The 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+)reduceL1✓✓Input ‘axes’ if present should be a constant
ReduceL2ai.onnx (7-10, 11-12, 13-17, 18+)reduceL2✓✓Input ‘axes’ if present should be a constant
ReduceLogSumai.onnx (7-10, 11-12, 13-17, 18+)reduceLogSum✓✓Input ‘axes’ if present should be a constant
ReduceLogSumExpai.onnx (7-10, 11-12, 13-17, 18+)reduceLogSumExp✓✓Input ‘axes’ if present should be a constant
ReduceMaxai.onnx (7-10, 11, 12, 13-17, 18-19, 20+)reduceMax✓✓Input ‘axes’ if present should be a constant
ReduceMeanai.onnx (7-10, 11-12, 13-17, 18+)reduceMean✓✓Input ‘axes’ if present should be a constant
ReduceMinai.onnx (7-10, 11, 12, 13-17, 18-19, 20+)reduceMin✓✓Input ‘axes’ if present should be a constant
ReduceProdai.onnx (7-10, 11-12, 13-17, 18+)reduceProduct✓✓Input ‘axes’ if present should be a constant
ReduceSumai.onnx (7-10, 11-12, 13+)reduceSum✓✓Input ‘axes’ if present should be a constant
ReduceSumSquareai.onnx (7-10, 11-12, 13-17, 18+)reduceSumSquare✓✓Input ‘axes’ if present should be a constant
Reluai.onnx (7-12, 13, 14+)relu✓✓
Reshapeai.onnx (7-12, 13, 14-18, 19-20, 21+)reshape✓✓Input ‘shape’ should be a constant, 0 dimension value in ‘shape’ is not supported
Resizeai.onnx (11-12, 13-17, 18, 19+)resample2d✓✓Only 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+)scatterElements✗✓Only supports ‘reduction’ == ‘none’
ScatterNDai.onnx (11-12, 13-15, 16-17, 18+)scatterND✗✓Only 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, reverse✓✓Input ‘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+)split✓✓Input ‘split’ if present should be a constant
Sqrtai.onnx (7-12, 13+)sqrt✓✓
Squeezeai.onnx (7-10, 11-12, 13-20, 21+)reshape✓✓Input ‘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+)tile✗✓Input ‘repeats’ should be a constant
Transposeai.onnx (7-12, 13-20, 21+)transpose✓✓
Triluai.onnx (14+)triangular✓✓Input ‘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✗✓