-
Notifications
You must be signed in to change notification settings - Fork 108
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
StableHLO Compatibility Tool #255
Comments
Reworked #278 to match Compatibility RFC v2 (#115). Addressing feedback with the hopes of landing the PR this week. The initial implementation is landing with the VHLO versioned dialect and conversions between StableHLO <-> VLHO, and between versions of VHLO ops. After that, more evaluation will need to be put into a scalable test plan, enhancing user experience, and other minor finishing touches to make this tool production ready. |
Add StableHLO compatibility dialect and passes for reading and writing with forward/backward compatibility guarantees. **Note: This is still a prototype implementation and should not be used in production until RFCs have been approved and types have been forked.** ```bash stablehlo-opt [flags] file.mlir --stablehlo-legalize-to-vhlo --vhlo-to-version='target=[version]' Translate versioned dialect to target version (current, 0.3.0, ...) --vhlo-legalize-to-stablehlo ``` Change description: - Introduce VHLO, the Versioned StableHLO Dialect. + This dialect is a shallow copy of StableHLO's in-memory layout. It does not include verifiers or constraints. + Once an op is added to VHLO it must remain unchanged so that it can be guaranteed that a VHLO op is identical across versions. + The first version of VHLO is `0.3.0`. - Conversion passes for compatibility + StableHLO <--> VHLO legalizations. StableHLO is always able to be legalized to/from the latest version of VHLO. + VHLO-to-version. Target previous versions of VHLO ops for forward compatibility. Upgrade to the latest version of VHLO ops to emit StableHLO. - Testing for legalizations and version conversions. Future work (these items will be made into individual GH issues before submit): - Think more about a scalable way to test this as StableHLO evolves. - Additional feature work on the tool.. any missing flags? Pass pipeline for simplicity? - Improve user experience. - See open [compatibility issues](https://github.com/openxla/stablehlo/labels/Compatibility) Closes #255
Add StableHLO compatibility dialect and passes for reading and writing with forward/backward compatibility guarantees. **Note: This is still a prototype implementation and should not be used in production until RFCs have been approved and types have been forked.** ```bash stablehlo-opt [flags] file.mlir --stablehlo-legalize-to-vhlo --vhlo-to-version='target=[version]' Translate versioned dialect to target version (current, 0.3.0, ...) --vhlo-legalize-to-stablehlo ``` Change description: - Introduce VHLO, the Versioned StableHLO Dialect. + This dialect is a shallow copy of StableHLO's in-memory layout. It does not include verifiers or constraints. + Once an op is added to VHLO it must remain unchanged so that it can be guaranteed that a VHLO op is identical across versions. + The first version of VHLO is `0.3.0`. - Conversion passes for compatibility + StableHLO <--> VHLO legalizations. StableHLO is always able to be legalized to/from the latest version of VHLO. + VHLO-to-version. Target previous versions of VHLO ops for forward compatibility. Upgrade to the latest version of VHLO ops to emit StableHLO. - Testing for legalizations and version conversions. Future work (these items will be made into individual GH issues before submit): - Think more about a scalable way to test this as StableHLO evolves. - Additional feature work on the tool.. any missing flags? Pass pipeline for simplicity? - Improve user experience. - See open [compatibility issues](https://github.com/openxla/stablehlo/labels/Compatibility) Closes openxla#255
Request description
Create a tool that allows maintenance of compatibility for changes within the StableHLO/CHLO dialects.
This will allow us to begin incorporating new ops, new op attributes/types, and op renames/moves into the StableHLO repo.
This tool will need to be accompanied by an adequate test infrastructure to detect incompatible changes.
The text was updated successfully, but these errors were encountered: