• RFC: Stabilize MLIR Builtin Bytecode Serialization Overview This document outlines the proposal for stabilizing the MLIR Builtin dialect’s Attribute and Type bytecode encoding. • Currently, the Builtin dialect’s bytecode lacks versioning or any stability guarantees, leading to costly workarounds for those requiring stability. • This was needed even though the Builtin dialect’s bytecode encoding has remained stable, with only one inadvertent change since its inception, and with no plans for large scale innovation (nor obvious cases where the benefit is worth the cost). • Proposal - Make Builtin dialect’s bytecode serialization stable: - Agree on a subset of Builtin dialect attributes and types’s bytecode encoding to be fixed; - Ensure these encodings remain stable across versions; - Add new encodings to address missing gap using an approach of adding reader support, giving time to update and then bumping dialect version along with enabling writer support; - Address the gaps before considering version 0 “snapped”; - Add a single integer version to Builtin dialect serialization; - The version will start with 0 and post the addition of the encodings marked in gap below; - The version will not be emitted for version 0 (this allows for introducing it in a backwards compatible manner); - The version will be bumped if encodings change including the addition of new Attributes/Types or new encodings for existing ones; - Regression tests to enforce this; Rollout Timeline To ensure a smooth tr
Article Summaries:
- RFC: Stabilize MLIR Builtin Bytecode Serialization Overview This document outlines the proposal for stabilizing the MLIR Builtin dialect’s Attribute and Type bytecode encoding. Currently, the Builtin dialect’s bytecode lacks versioning or any stability guarantees, leading to costly workarounds for those requiring stability. This was needed even though the Builtin dialect’s bytecode encoding has remained stable, with only one inadvertent change since its inception, and with no plans for large scale innovation (nor obvious cases where the benefit is worth the cost). Proposal - Make Builtin diale
Sources:
- https://discourse.llvm.org/t/rfc-builtin-dialect-bytecode-versioning/89978 (Latest source article published: 2026-02-25 09:57 UTC)