You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to understand one of the optimization that seems to be running when using --EmitONNXIR compared to --EmitONNXBasic
If we take the following examples
Where the order of the Mul ops is the same as in the textual (or binary) version of the model (Notice that the results of Split is used in the first and last Mul)
Now, if I run onnx-mlir --EmitONNXIR MyModel.onnx, I have:
In this case, the last Mul has been moved up compared to the previous IR.
I am trying to understand what pass or optimization could be causing this behaviour, and if there is a way to disable it without disabling other optimizations. Could someone help me with that?
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered:
That feels like maybe constant propagation. Have you tried to run with the -mlir-print-ir-after-all? It may list the offending optimizations.
Also, if it list the hybird opt, where multiple opt are mashed together, we used to have an alternative to that pass, but it might have been yanked.
My recollection is that basic was before anything was done, and the other one was after shape inference. So are there reasons you still want to run with some but not all opts present in the EmitONNXIR?
We can probably adapt when the code is emitted for that later target, and/or making another target that emit after only what you want.
I am trying to understand one of the optimization that seems to be running when using
--EmitONNXIR
compared to--EmitONNXBasic
If we take the following examples
and run
onnx-mlir --EmitONNXBasic MyModel.onnx
, I get:Where the order of the
Mul
ops is the same as in the textual (or binary) version of the model (Notice that the results of Split is used in the first and lastMul
)Now, if I run
onnx-mlir --EmitONNXIR MyModel.onnx
, I have:In this case, the last
Mul
has been moved up compared to the previous IR.I am trying to understand what pass or optimization could be causing this behaviour, and if there is a way to disable it without disabling other optimizations. Could someone help me with that?
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered: