Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3 |
|
#
0e0b6070 |
| 14-Feb-2023 |
Matteo Franciolini <m_franciolini@apple.com> |
Implements MLIR Bytecode versioning capability
A dialect can opt-in to handle versioning through the `BytecodeDialectInterface`. Few hooks are exposed to the dialect to allow managing a version enco
Implements MLIR Bytecode versioning capability
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
show more ...
|
Revision tags: llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1 |
|
#
5fb1bbe6 |
| 13-Sep-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir] Add bytecode encodings for the builtin ElementsAttr attributes
This adds bytecode support for DenseArrayAttr, DenseIntOrFpElementsAttr, DenseStringElementsAttr, and SparseElementsAttr.
Diffe
[mlir] Add bytecode encodings for the builtin ElementsAttr attributes
This adds bytecode support for DenseArrayAttr, DenseIntOrFpElementsAttr, DenseStringElementsAttr, and SparseElementsAttr.
Differential Revision: https://reviews.llvm.org/D133744
show more ...
|
#
34300ee3 |
| 13-Sep-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir] Add fallback support for parsing/printing unknown external resources
This is necessary/useful for building generic tooling that can roundtrip external resources without needing to explicitly
[mlir] Add fallback support for parsing/printing unknown external resources
This is necessary/useful for building generic tooling that can roundtrip external resources without needing to explicitly handle them. For example, this allows for viewing the resources encoded within a bytecode file without having to explicitly know how to process them (e.g. making it easier to interact with a reproducer encoded in bytecode).
Differential Revision: https://reviews.llvm.org/D133460
show more ...
|
#
6ab2bcff |
| 07-Sep-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir:Bytecode] Add support for encoding resources
Resources are encoded in two separate sections similarly to attributes/types, one for the actual data and one for the data offsets. Unlike other se
[mlir:Bytecode] Add support for encoding resources
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
show more ...
|
Revision tags: llvmorg-15.0.0 |
|
#
221f7853 |
| 29-Aug-2022 |
Mehdi Amini <joker.eph@gmail.com> |
Apply clang-tidy fixes for readability-identifier-naming in BytecodeWriter.cpp (NFC)
|
Revision tags: llvmorg-15.0.0-rc3 |
|
#
2f90764c |
| 24-Aug-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir:Bytecode] Add encoding support for a majority of the builtin attributes
This adds support for the non-location, non-elements, non-affine builtin attributes.
Differential Revision: https://rev
[mlir:Bytecode] Add encoding support for a majority of the builtin attributes
This adds support for the non-location, non-elements, non-affine builtin attributes.
Differential Revision: https://reviews.llvm.org/D132539
show more ...
|
#
ae97b5ac |
| 24-Aug-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir:Bytecode] Move variable to inside of the lambda to fix MSVC build
MSVC is not picking up a variable capture somehow, try moving it inside.
|
#
02c2ecb9 |
| 23-Aug-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir:Bytecode] Add initial support for dialect defined attribute/type encodings
Dialects can opt-in to providing custom encodings by implementing the `BytecodeDialectInterface`. This interface prov
[mlir:Bytecode] Add initial support for dialect defined attribute/type encodings
Dialects can opt-in to providing custom encodings by implementing the `BytecodeDialectInterface`. This interface provides hooks, namely `readAttribute`/`readType` and `writeAttribute`/`writeType`, that will be used by the bytecode reader and writer. These hooks are provided a reader and writer implementation that can be used to encode various constructs in the underlying bytecode format. A unique feature of this interface is that dialects may choose to only encode a subset of their attributes and types in a custom bytecode format, which can simplify adding new or experimental components that aren't fully baked.
Differential Revision: https://reviews.llvm.org/D132498
show more ...
|
#
83dc9999 |
| 23-Aug-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir:Bytecode][NFC] Refactor string section writing and reading
This extracts the string section writer and reader into dedicated classes, which better separates the logic and will also simplify fu
[mlir:Bytecode][NFC] Refactor string section writing and reading
This extracts the string section writer and reader into dedicated classes, which better separates the logic and will also simplify future patches that want to interact with the string section.
Differential Revision: https://reviews.llvm.org/D132496
show more ...
|
#
f3acb54c |
| 12-Aug-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir] Add initial support for a binary serialization format
This commit adds a new bytecode serialization format for MLIR. The actual serialization of MLIR to binary is relatively straightforward,
[mlir] Add initial support for a binary serialization format
This commit adds a new bytecode serialization format for MLIR. The actual serialization of MLIR to binary is relatively straightforward, given the very very general structure of MLIR. The underlying basis for this format is a variable-length encoding for integers, which gets heavily used for nearly all aspects of the encoding (given that most of the encoding is just indexing into lists).
The format currently does not provide support for custom attribute/type serialization, and thus always uses an assembly format fallback. It also doesn't provide support for resources. These will be added in followups, the intention for this patch is to provide something that supports the basic cases, and can be built on top of.
https://discourse.llvm.org/t/rfc-a-binary-serialization-format-for-mlir/63518
Differential Revision: https://reviews.llvm.org/D131747
show more ...
|