torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

Iteratively run the main simplification pipeline.

Open silvasean opened this issue 2 years ago • 2 comments

(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

silvasean avatar Aug 05 '22 21:08 silvasean

@ramiro050 PTAL now that I fixed the CI issue.

silvasean avatar Aug 17 '22 04:08 silvasean

  • @ashay for a second pair of eyes on this architectural change.

silvasean avatar Aug 17 '22 04:08 silvasean