Onnx: einsum op

Created on 26 Sep 2019  路  3Comments  路  Source: onnx/onnx

I'm cross-referencing these issue https://github.com/pytorch/pytorch/issues/26893. I think the underlying issue there is that einsum is simply not supported by ONNX. Could this be added?

@matthewfeickert @kratsg

operator

Most helpful comment

From our SIG meeting, einsum should be added as OP to ONNX. @conjam what you are saying is true, but every exporter or converter need to understand how to parse the einsum expression and generate the corresponding ONNX sub-graph. Furthermore, the generated sub-graph will be slower to run.

All 3 comments

Does this require its own ONNX op? From my understanding einsum could be implemented as a sequence of already existing ONNX ops.

Does anyone know if this is the case, or is there functionality not currently covered?

@conjam I think most frameworks have einsum as a first-class op. Maybe @mattjj can comment on what the process was to add it to jax (see source code here:

https://github.com/google/jax/blob/master/jax/numpy/lax_numpy.py#L2017
https://github.com/google/jax/issues/37

From our SIG meeting, einsum should be added as OP to ONNX. @conjam what you are saying is true, but every exporter or converter need to understand how to parse the einsum expression and generate the corresponding ONNX sub-graph. Furthermore, the generated sub-graph will be slower to run.

Was this page helpful?
0 / 5 - 0 ratings