Open pashu123 opened 5 months ago
Both the IRs are correct; it's the implementation of how topological sort works.
@stellaraccident Any thoughts?
In general we want the compiler to be deterministic (especially with threading disabled). Were you able to find where in the code the nondeterminism is coming from?
yeah and we definitely want output 2 - output 1 is silly
In general we want the compiler to be deterministic (especially with threading disabled). Were you able to find where in the code the nondeterminism is coming from?
Happening around this loop https://github.com/iree-org/iree/blob/26e4c6b225a30466f93935e9d6d72b7a6d3f8155/compiler/src/iree/compiler/Dialect/Util/Transforms/HoistIntoGlobals.cpp#L103
What happened?
Output IR 1:
Output IR 2:
Output IR 1
successfully goes throughiree-compile
passes and outputs valid .vmfb, whereasOutput IR 2
doesn't.Steps to reproduce your issue
Example MLIR.
Run :
iree-opt -iree-util-hoist-into-globals above.mlir -mlir-disable-threading
Try 3-4 times to see different output IRs. The problem persists with
-mlir-disable-threading
.What component(s) does this issue relate to?
Compiler
Version information
No response
Additional context
No response