Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for missing ONNX operators #14

Open
robertknight opened this issue Sep 17, 2023 · 1 comment
Open

Support for missing ONNX operators #14

robertknight opened this issue Sep 17, 2023 · 1 comment

Comments

@robertknight
Copy link
Owner

robertknight commented Sep 17, 2023

This is a list of all operators from https://onnx.ai/onnx/operators/ which are currently not supported at all, as of ONNX v1.15.0. There are other operators which are incomplete in that they are missing support for certain attributes or datatypes.

Some of these operators will not make sense to support given the goals / constraints of the library (inference focused, minimal dependencies, modest binary size).

Some of these operators (eg. LayerNormalization) are composites of other operations, and existing models that "use" these operations will already work if the exporter created an ONNX graph using the constituent operations rather than the composite one (LayerNormalization and Gelu for example).

Operators and associated opset version where they were introduced:

Activations:

  • Celu
  • Elu
  • Gelu
  • HardSigmoid (WIP)
  • HardSwish (WIP)
  • Mish
  • PRelu
  • Selu
  • ThresholdedRelu

Binary

  • And (1)
  • Or (1)
  • Xor (1)
  • GreaterOrEqual (12)

Bitwise ops

  • BitShift (11)
  • BitwiseAnd (18)
  • BitwiseNot (18)
  • BitwiseOr (18)
  • BitwiseXor (18)

Control flow

Image

  • Col2Im (18)
  • ConvInteger (10)
  • DeformConv (19)
  • Upsample (nb. this is deprecated. The replacement Resize operator is implemented)

Normalization

  • InstanceNormalization (1)
  • LayerNormalization
  • LpNormalization (1)
  • GroupNormalization

Optionals

  • Optional (15)
  • OptionalGetElement (15)
  • OptionalHasElement (15)

Pooling

  • LpPool (1)
  • MaxRoiPool (1)
  • GlobalLpPool (1)
  • GlobalMaxPool (1)

Random

  • RandomNormal (1)
  • RandomNormalLike (1)
  • RandomUniform (1)
  • RandomUniformLike (1)

Regularization

  • Dropout (1)

RNN

  • RNN (1)

Rounding

  • Ceil
  • Floor
  • Round

Reduction

  • ReduceL1
  • ReduceLogSum
  • ReduceLogSumExp
  • ReduceSumSquare

Scatter / Gather

  • GatherElements (11)
  • GatherND (11)
  • Scatter (9) - (nb. This is deprecated. The replacement ScatterElements operator is implemented.)
  • ScatterND (11)

Sequence

  • SequenceAt (11)
  • SequenceConstruct (11)
  • SequenceEmpty (11)
  • SequenceErase (11)
  • SequenceInsert (11)
  • SequenceLength (11)
  • SequenceMap

Trigonometry

  • Acos (7)
  • Acosh (9)
  • Asin (7)
  • Asinh (9)
  • Atan (7)
  • Atanh (9)
  • Cosh (9)
  • Sinh (9)
  • Tan (7)

Unary

  • Exp (1)
  • Neg (1)
  • Sign (9)
  • IsInf (10)
  • IsNaN (9)
  • Reciprocal
  • Softplus
  • Softsign

Other

  • AffineGrid
  • Bernoulli
  • BlackmanWindow
  • CastLike
  • CenterCropPad
  • Compress (9)
  • ConcatFromSequence (11)
  • DFT (17)
  • DepthToSpace (1)
  • DequantizeLinear (10)
  • Det (11)
  • DynamicQuantizeLinear
  • Einsum (12) (Support Einsum operator #298)
  • EyeLike (9)
  • GridSample (16)
  • HammingWindow
  • HannWindow
  • Hardmax (1)
  • ImageDecoder (20)
  • LRN (1)
  • MatMulInteger (10)
  • MaxUnpool (9)
  • MeanVarianceNormalization
  • MelWeightMatrix (17)
  • Multinomial (7)
  • NegativeLogLikelihoodLoss
  • NonMaxSuppression
  • OneHot
  • QLinearConv (10)
  • QLinearMatMul (10)
  • QuantizeLinear (10)
  • RegexFullMatch (20)
  • ReverseSequence (10)
  • RoiAlign (10)
  • STFT (17)
  • Shrink
  • Size (1)
  • SoftmaxCrossEntropyLoss
  • SpaceToDepth (1)
  • SplitToSequence (11)
  • StringConcat (20)
  • StringNormalizer (10)
  • StringSplit (20)
  • TfIdfVectorizer (9)
  • TopK
  • Trilu (14)
  • Unique (11)
@robertknight
Copy link
Owner Author

Strings that look like ONNX operator names (match "[A-Z][A-Za-z]+"') grepped from torch/onnx/symbolic_opset*.py. This gives a rough idea of which ONNX operators models exported from PyTorch might actually use.

Abs
Acos
Add
Affine
And
ArgMax
ArgMin
Asin
Atan
AveragePool
BatchNormalization
Bernoulli
BitShift
Bool
CRD
Cast
Ceil
Celu
Clip
Concat
ConcatFromSequence
Constant
ConstantFill
ConstantOfShape
Conv
ConvTranspose
Cos
CumSum
Delete
DepthToSpace
DequantizeLinear
Det
Div
Dropout
DynamicSlice
Einsum
Elu
Equal
Erf
Exp
Expand
EyeLike
Flatten
Floor
GRU
Gather
GatherElements
GatherND
Gemm
GlobalAveragePool
GlobalMaxPool
Greater
GreaterOrEqual
GridSample
HardSigmoid
HardSwish
Identity
If
InstanceNormalization
IsInf
IsNaN
LEFT
LSTM
LayerNormalization
LeakyRelu
Less
LessOrEqual
Log
LogSoftmax
Loop
MatMul
Max
MaxPool
Min
Mod
Mul
Multinomial
Neg
NegativeLogLikelihoodLoss
NonZero
Not
OneHot
OptionalGetElement
OptionalHasElement
Or
PRelu
Pad
Pow
QuantizeLinear
RIGHT
RNN
RandomNormal
RandomNormalLike
RandomUniform
RandomUniformLike
Range
Reciprocal
ReduceLogSumExp
ReduceMax
ReduceMean
ReduceMin
ReduceProd
ReduceSum
Relu
Reshape
Resize
Round
STFT
ScaledTanh
Scatter
ScatterElements
ScatterND
Selu
SequenceAt
SequenceConstruct
SequenceEmpty
SequenceErase
SequenceInsert
SequenceLength
Shape
Sigmoid
Sign
Sin
Size
Slice
Softmax
SoftmaxCrossEntropyLoss
Softplus
Softsign
Sort
Split
SplitToSequence
Sqrt
Squeeze
Sub
Tan
Tanh
Tensor
Tensordot
ThresholdedRelu
Tile
TopK
Transpose
Trilu
Unfold
Unique
Unsqueeze
Upsample
VALID
Where
Xor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant