-
Notifications
You must be signed in to change notification settings - Fork 325
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
Difference in operation ordering between --EmitONNXIR and --EmitONNXBasic #3010
Comments
That feels like maybe constant propagation. Have you tried to run with the Also, if it list the 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 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. |
Hi @AlexandreEichenberger thanks for the answer! Indeed after looking into it, both Constant propagation and the |
@flemairen6 feel free to modify the order of opts leading to If there are different patterns, feel free to play with the rule priorities as well. |
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: