torch-mlir
torch-mlir copied to clipboard
Iteratively run the main simplification pipeline.
(ignore the "Rework how global slot initializers work." commit -- this one doesn't trivially commute with it, but is still logically separate)
This introduces a new pass LowerToBackendContract (better name very welcome) which performs the bulk of the simplifications that we do, such as
- shape refinement
- dtype refinement
- maximizing value semantics
- inlining global slots
- decomposing complex ops
The key difference from before is that it iterates the set of transformations, which can help to break a number of "catch-22" issues where one simplification depends on another, the latest example being here: https://github.com/llvm/torch-mlir/issues/1131
@ramiro050 PTAL now that I fixed the CI issue.
- @ashay for a second pair of eyes on this architectural change.