llvm-project/mlir/docs
Alex Zinenko 519847fefc [mlir] materialize strided memref layout as attribute
Introduce a new attribute to represent the strided memref layout. Strided
layouts are omnipresent in code generation flows and are the only kind of
layouts produced and supported by a half of operation in the memref dialect
(view-related, shape-related). However, they are internally represented as
affine maps that require a somewhat fragile extraction of the strides from the
linear form that also comes with an overhead. Furthermore, textual
representation of strided layouts as affine maps is difficult to read: compare
`affine_map<(d0, d1, d2)[s0, s1] -> (d0*32 + d1*s0 + s1 + d2)>` with
`strides: [32, ?, 1], offset: ?`. While a rudimentary support for parsing a
syntactically sugared version of the strided layout has existed in the codebase
for a long time, it does not go as far as this commit to make the strided
layout a first-class attribute in the IR.

This introduces the attribute and updates the tests that using the pre-existing
sugared form to use the new attribute instead. Most memref created
programmatically, e.g., in passes, still use the affine form with further
extraction of strides and will be updated separately.

Update and clean-up the memref type documentation that has gotten stale and has
been referring to the details of affine map composition that are long gone.

See https://discourse.llvm.org/t/rfc-materialize-strided-memref-layout-as-an-attribute/64211.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D132864
2022-08-30 17:19:58 +02:00
..
Bindings [mlir][math] Rename math.abs -> math.absf 2022-08-08 11:04:58 -04:00
Dialects [mlir] materialize strided memref layout as attribute 2022-08-30 17:19:58 +02:00
Rationale [mlir][NFC] Update textual references of `func` to `func.func` in examples+python scripts 2022-04-20 22:17:26 -07:00
Tools [mlir:LSP] Add a quickfix code action for inserting expected-* diagnostic checks 2022-07-20 15:43:59 -07:00
Tutorials [mlir][LLVMIR] "Modernize" Insert/ExtractValueOp 2022-08-10 12:51:11 -04:00
includes/img [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
AttributesAndTypes.md [mlir][ods] Support string literals in `custom` directives 2022-08-12 20:55:11 -04:00
BufferDeallocationInternals.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
Bufferization.md [mlir][bufferize][NFC] Remove BufferizationState 2022-06-17 14:04:11 +02:00
BytecodeFormat.md [mlir:Bytecode] Add encoding support for a majority of the builtin attributes 2022-08-26 13:31:05 -07:00
CAPI.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
CMakeLists.txt
Canonicalization.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
DataLayout.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
DebugActions.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
DeclarativeRewrites.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
DefiningDialects.md [mlir][docs] Migrate away from deprecated llvm::Optional methods 2022-08-19 23:29:31 -07:00
Diagnostics.md [mlir] Add support for regex within `expected-*` diagnostics 2022-07-11 21:01:30 -07:00
DialectConversion.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
Interfaces.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
LangRef.md [mlir:Parser] Don't use strings for the "ugly" form of Attribute/Type syntax 2022-07-05 16:20:30 -07:00
OpDefinitions.md [mlir][ods] Rename Confined and AllAttrConstraintsOf 2022-08-12 22:36:17 -04:00
PDLL.md [mlir][ods] Make Type- and AttrInterfaces also `Type`s and `Attr`s 2022-07-07 11:54:47 +02:00
PassManagement.md [MLIR] Unique autogenerated file for tablegen passes 2022-08-30 09:48:11 +02:00
Passes.md [mlir][doc] Move pass to passes list and remove redundant doc 2022-06-13 21:01:31 -07:00
PatternRewriter.md (Reland) [mlir] Switch segment size attributes to DenseI32ArrayAttr 2022-08-12 19:44:52 -04:00
Quantization.md Fix invalid math formulas in quantization doc 2021-06-01 03:50:59 +00:00
README.txt
SPIRVToLLVMDialectConversion.md [mlir][LLVMIR] "Modernize" Insert/ExtractValueOp 2022-08-10 12:51:11 -04:00
ShapeInference.md [mlir] add TOC to top-level documents 2022-08-02 13:22:40 +02:00
SymbolsAndSymbolTables.md [mlir][NFC] Update textual references of `func` to `func.func` in examples+python scripts 2022-04-20 22:17:26 -07:00
TargetLLVMIR.md [mlir] Only conditionally lower CF branching ops to LLVM 2022-08-04 16:36:27 +02:00
Traits.md [mlir] Support verification order (2/3) 2022-02-25 19:04:56 +00:00
doxygen-mainpage.dox
doxygen.cfg.in [mlir] use dynamic sections in MLIR Doxygen 2022-05-13 11:43:52 +02:00

README.txt

MLIR documentation
==================

Please note mlir.llvm.org is where MLIR's rendered documentation is displayed.
The viewing experience on GitHub or elsewhere may not match those of the
website. For any changes please verify instead that they work on the main
website first.

See https://github.com/llvm/mlir-www for the website generation information.