<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/docs/BytecodeFormat.md, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[MLIR][Bytecode] Followup 8106c81 (#157136)</title>
<updated>2025-09-11T13:08:56+00:00</updated>
<author>
<name>Nikhil Kalra</name>
<email>nkalra@apple.com</email>
</author>
<published>2025-09-11T13:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3168a62a3b25e3df87ea4374814ff2853037d524'/>
<id>3168a62a3b25e3df87ea4374814ff2853037d524</id>
<content type='text'>
Addressed code review feedback:
- Fixed some issues in the unit test
- Adjusted line wrapping in the docs
- Clarified comments in the bytecode reader</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addressed code review feedback:
- Fixed some issues in the unit test
- Adjusted line wrapping in the docs
- Clarified comments in the bytecode reader</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Bytecode] Enforce alignment requirements (#157004)</title>
<updated>2025-09-05T05:31:40+00:00</updated>
<author>
<name>Nikhil Kalra</name>
<email>nkalra@apple.com</email>
</author>
<published>2025-09-05T05:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8106c816eb8b279ee4220936c43a0e495d1bb1a0'/>
<id>8106c816eb8b279ee4220936c43a0e495d1bb1a0</id>
<content type='text'>
Adds a check that the bytecode buffer is aligned to any section
alignment requirements. Without this check, if the source buffer is not
sufficiently aligned, we may return early when aligning the data
pointer. In that case, we may end up trying to read successive sections
from an incorrect offset, giving the appearance of invalid bytecode.

This requirement is documented in the bytecode unit tests, but is not
otherwise documented in the code or bytecode reference.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a check that the bytecode buffer is aligned to any section
alignment requirements. Without this check, if the source buffer is not
sufficiently aligned, we may return early when aligning the data
pointer. In that case, we may end up trying to read successive sections
from an incorrect offset, giving the appearance of invalid bytecode.

This requirement is documented in the bytecode unit tests, but is not
otherwise documented in the code or bytecode reference.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][docs] Update Bytecode documentation (#99854)</title>
<updated>2024-08-19T08:23:56+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2024-08-19T08:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5795f9e27390fe5c322853476b3c9ba8376e8541'/>
<id>5795f9e27390fe5c322853476b3c9ba8376e8541</id>
<content type='text'>
There were some discrepancies between the dialect section documentation
and the implementation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were some discrepancies between the dialect section documentation
and the implementation.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Document the stability and versioning aspect of the Bytecode (#81969)</title>
<updated>2024-02-16T21:25:03+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2024-02-16T21:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=450462cbaceddf57812ce15b5135b17f65a77654'/>
<id>450462cbaceddf57812ce15b5135b17f65a77654</id>
<content type='text'>
See the two RFCs:


https://discourse.llvm.org/t/rfc-mlir-bytecode-a-stable-serialization-format/71062
https://discourse.llvm.org/t/rfc-ir-versioning/5893</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See the two RFCs:


https://discourse.llvm.org/t/rfc-mlir-bytecode-a-stable-serialization-format/71062
https://discourse.llvm.org/t/rfc-ir-versioning/5893</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][bytecode] Avoid recording null arglocs &amp; realloc opnames.</title>
<updated>2023-05-25T16:24:50+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2023-05-25T16:24:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1826fadb0d2bc5b61d6c028d8006b2a7d1249ec0'/>
<id>1826fadb0d2bc5b61d6c028d8006b2a7d1249ec0</id>
<content type='text'>
For block arg locs a common case is no/uknown location (where the producer
signifies they don't care about blockarg location). Also avoid needing to
dynamically resize opnames during parsing.

Assumed to be post lazy loading change, so chose version 3.

Differential Revision: https://reviews.llvm.org/D151038
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For block arg locs a common case is no/uknown location (where the producer
signifies they don't care about blockarg location). Also avoid needing to
dynamically resize opnames during parsing.

Assumed to be post lazy loading change, so chose version 3.

Differential Revision: https://reviews.llvm.org/D151038
</pre>
</div>
</content>
</entry>
<entry>
<title>Preserve use-list orders in mlir bytecode</title>
<updated>2023-05-21T23:48:12+00:00</updated>
<author>
<name>Matteo Franciolini</name>
<email>m_franciolini@apple.com</email>
</author>
<published>2023-05-21T23:46:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=612781918fb01a2a0985a1c4c9200f5d5d1581cc'/>
<id>612781918fb01a2a0985a1c4c9200f5d5d1581cc</id>
<content type='text'>
This patch implements a mechanism to read/write use-list orders from/to the mlir bytecode format. When producing bytecode, use-list orders are appended to each value of the IR. When reading bytecode, use-lists orders are loaded in memory and used at the end of parsing to sort the existing use-list chains.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D149755
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements a mechanism to read/write use-list orders from/to the mlir bytecode format. When producing bytecode, use-list orders are appended to each value of the IR. When reading bytecode, use-lists orders are loaded in memory and used at the end of parsing to sort the existing use-list chains.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D149755
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for Lazyloading to the MLIR bytecode</title>
<updated>2023-05-20T22:24:33+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2023-04-29T09:36:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3128b3105d7a226fc26174be265da479ff619f3e'/>
<id>3128b3105d7a226fc26174be265da479ff619f3e</id>
<content type='text'>
IsolatedRegions are emitted in sections in order for the reader to be
able to skip over them. A new class is exposed to manage the state and
allow the readers to load these IsolatedRegions on-demand.

Differential Revision: https://reviews.llvm.org/D149515
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IsolatedRegions are emitted in sections in order for the reader to be
able to skip over them. A new class is exposed to manage the state and
allow the readers to load these IsolatedRegions on-demand.

Differential Revision: https://reviews.llvm.org/D149515
</pre>
</div>
</content>
</entry>
<entry>
<title>Implements MLIR Bytecode versioning capability</title>
<updated>2023-03-10T22:28:56+00:00</updated>
<author>
<name>Matteo Franciolini</name>
<email>m_franciolini@apple.com</email>
</author>
<published>2023-02-14T16:45:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0e0b6070fd2a2a8f188ddb32aa526beda38190b7'/>
<id>0e0b6070fd2a2a8f188ddb32aa526beda38190b7</id>
<content type='text'>
A dialect can opt-in to handle versioning through the
`BytecodeDialectInterface`. Few hooks are exposed to the dialect to allow
managing a version encoded into the bytecode file. The version is loaded
lazily and allows to retrieve the version information while parsing the input
IR, and gives an opportunity to each dialect for which a version is present
to perform IR upgrades post-parsing through the `upgradeFromVersion` method.
Custom Attribute and Type encodings can also be upgraded according to the
dialect version using readAttribute and readType methods.

There is no restriction on what kind of information a dialect is allowed to
encode to model its versioning. Currently, versioning is supported only for
bytecode formats.

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D143647
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A dialect can opt-in to handle versioning through the
`BytecodeDialectInterface`. Few hooks are exposed to the dialect to allow
managing a version encoded into the bytecode file. The version is loaded
lazily and allows to retrieve the version information while parsing the input
IR, and gives an opportunity to each dialect for which a version is present
to perform IR upgrades post-parsing through the `upgradeFromVersion` method.
Custom Attribute and Type encodings can also be upgraded according to the
dialect version using readAttribute and readType methods.

There is no restriction on what kind of information a dialect is allowed to
encode to model its versioning. Currently, versioning is supported only for
bytecode formats.

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D143647
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][doc] Remove trailing whitespace (NFC)</title>
<updated>2022-10-07T16:05:49+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2022-10-07T16:05:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9033e57ca5c1198468baa797bc90f97008616572'/>
<id>9033e57ca5c1198468baa797bc90f97008616572</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir:Bytecode] Add support for encoding resources</title>
<updated>2022-09-13T18:39:19+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-09-07T03:47:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6ab2bcffe45e660a68493e6a7cd04b6f05da51dc'/>
<id>6ab2bcffe45e660a68493e6a7cd04b6f05da51dc</id>
<content type='text'>
Resources are encoded in two separate sections similarly to
attributes/types, one for the actual data and one for the data
offsets. Unlike other sections, the resource sections are optional
given that in many cases they won't be present. For testing,
bytecode serialization is added for DenseResourceElementsAttr.

Differential Revision: https://reviews.llvm.org/D132729
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resources are encoded in two separate sections similarly to
attributes/types, one for the actual data and one for the data
offsets. Unlike other sections, the resource sections are optional
given that in many cases they won't be present. For testing,
bytecode serialization is added for DenseResourceElementsAttr.

Differential Revision: https://reviews.llvm.org/D132729
</pre>
</div>
</content>
</entry>
</feed>
