File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
# MLIR Bytecode Format
2
2
3
3
This documents describes the MLIR bytecode format and its encoding.
4
+ This format is versioned and stable: we don't plan to ever break
5
+ compatibility, that is a dialect should be able to deserialize and
6
+ older bytecode. Similarly, we support back-deployment we an older
7
+ version of the format can be targetted.
8
+
9
+ That said, it is important to realize that the promises of the
10
+ bytecode format are made assuming immutable dialects: the format
11
+ allows backward and forward compatibility, but only when nothing
12
+ in a dialect changes (operations, types, attributes definitions).
13
+
14
+ A dialect can opt-in to handle its own versioning through the
15
+ ` BytecodeDialectInterface ` . Some hooks are exposed to the dialect
16
+ to allow managing a version encoded into the bytecode file. The
17
+ version is loaded lazily and allows to retrieve the version
18
+ information while decoding the input IR, and gives an opportunity
19
+ to each dialect for which a version is present to perform IR
20
+ upgrades post-parsing through the ` upgradeFromVersion ` method.
21
+ There is no restriction on what kind of information a dialect
22
+ is allowed to encode to model its versioning
4
23
5
24
[ TOC]
6
25
You can’t perform that action at this time.
0 commit comments