Hi folks,
TL;DR: We propose a plan towards switching to the StableHLO-based input conversion pipeline in IREE.
IREE accepts multiple input formats, including StableHLO and MHLO. The input processing pipeline is decided based on the --iree-input-type flag, and can also be decided automatically using --iree-auto-input-conversion. Currently, the default pipeline for both StableHLO and MHLO is called mhlo, as it does lightweight preprocessing using the MHLO dialect, before being converted to Linalg on tensors + IREE Flow/Utils dialects.
With mlir-hlo winding down (https://discourse.llvm.org/t/sunsetting-the-mlir-hlo-repository/70536), we decided to port the input conversion pipeline to ingest StableHLO directly. This work is being tracked by this IREE issue: https://github.com/openxla/iree/issues/12678. The new input conversion pipeline, enabled with --iree-input-type=stablehlo is nearing feature-parity with the mhlo one and can already ingest all of the IREE TF benchmarks.
We plan to make the stablehlo input conversion pipeline be the default and would like to request community feedback on this plan. We expect the switch to be a transparent change, as with StableHLO as the input format, input conversion is an implementation detail. Ideally, we would like to avoid having to maintain both pipelines over a long time and propose to phase out the mhlo pipeline gradually, and give the community time to signal any issues discovered along the way.
The proposed transition plan is:
In 1 week:
Allow for the stablehlo pipeline to ingest MHLO as an input format and immediately convert it to StableHLO.
In 2 weeks:
Switch all the compatible benchmarks to --iree-input-type=stablehlo.
Port the tuple flattening pass (--iree-input-type=xla).
Make the stablehlo pipeline be the default input type for --iree-auto-input-conversion.
Move all feature development work (e.g., collectives) to the stablehlo pipeline.
In 3 weeks:
Rename the mhlo pipeline to mhlo_legacy.
In 4 weeks:
Remove the mhlo_legacy pipeline.
Remove support for MHLO as an input format.
Remove mlir-hlo from IREE submodules.
Let us know what your thoughts are. If you have some inputs or use cases that you care about that may not be covered by our test suite, feel free to send them my way.
--
You received this message because you are subscribed to the Google Groups "OpenXLA Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openxla-discu...@openxla.org.
To view this discussion on the web visit https://groups.google.com/a/openxla.org/d/msgid/openxla-discuss/CAG%2BB7V%3D3Cvut%3DMwLrr8HoBqaHB6kDFdZ6fy4vMSfs3nD5YvrLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/a/openxla.org/d/optout.
Nice to see us getting close here!If folks already switch to iree-auto-input-conversion rather than specifying a specific type (auto is new and may require a fix or too, in particular it doesn't detect stablehlo ops at all, and for error cases it would return different error) then they may not notice any change (e.g., perhaps in 1c let's just elide the type anywhere it doesn't matter). I'd also be pro emitting a warning when detecting the shim form in week 2.Thanks,Jacques(Typed on mobile, so it reads a bit like an airport conversation...)
You received this message because you are subscribed to the Google Groups "iree-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iree-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iree-discuss/8b923b1f-f962-4ebe-a828-30d4b217ac8bn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/a/openxla.org/d/msgid/openxla-discuss/CAG%2BB7VnvsaNkh4FBbytHaXcwjUPRFyZkw_RFiYig9hJ11nNVyA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/openxla.org/d/msgid/openxla-discuss/CAG%2BB7V%3Dad7L-7vMyzrEFVh-n0wh39Dcq7vY9iN30ip3KOhKg8g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iree-discuss/CAEkedjhYzQfHEmX-i2zijvM0cdO%3DitHZbhZP6DA%3Dfh4BrunorQ%40mail.gmail.com.