Describe the bug
numpy.einsum(), which is the reference implementation for ONNX’s EinSum, accepts “ZY,YX->ZX” whereas ORT CPU fails on the equation. Turns out that ORT only accepts lowercase “zy,yx->zx” (that’s the only test case of 29 that failed when writing tests for the DirectML execution provider).
Urgency
Not blocked on 1.5, as we just disabled the test case for the CPU EP on our side.
{
"op_type": "Einsum",
"graph_name": "Einsum ZY,YX->ZX matmul 2D uppercase float32",
"equation": "ZY,YX->ZX",
"data_0": [[0,1],[2,3]],
"data_1": [[1,2],[3,4]],
"output": [[3,4],[11,16]],
"T": "float32",
"verification": { "executor_filter": ".*Cpu" } // ORT rejects uppercase letters, even though the ONNX reference numpy accepts them.
},
System information
To Reproduce
Expected behavior
EinSum reads a-z and A-Z. Note a != A. So iK,Kk->ik is not equivalent to ik,kk->ik, but rather equivalent to ij,jk->ik.
Good to know, thanks !
Yeah, figured a != A - if it were, it is simply just a matter of converting all characters to lower case before execution.
I ll make the change to support upper-cased characters. Shouldn't be too hard.
I noticed that the above fix allows for upper case letters in the left hand side of the equation but not the right hand output equation, so have opened a PR to address this at:
@AndrewMcDowell - Thanks, I had one small job and I blew it :(. Thanks for catching the oversight.
@AndrewMcDowell - Thanks, I had one small job and I blew it :(. Thanks for catching the oversight.
No worries! Thanks for doing the first fix so quickly.
Is there an expected timeline or somewhere with more information for when this fix will be in an official release (in particular the java release on maven central)? It doesn't seem to be included in the 1.5.3 release and that hasn't been put on mvn yet either.
It will be in 1.6 (coming out in the next 2 weeks). Thanks.
Thank you!