llvm/mlir/docs
Jacques Pienaar b0921f68e1 [mlir] Add verify method to adaptor
This allows verifying op-indepent attributes (e.g., attributes that do not require the op to have been created) before constructing an operation. These include checking whether required attributes are defined or constraints on attributes (such as I32 attribute). This is not perfect (e.g., if one had a disjunctive constraint where one part relied on the op and the other doesn't, then this would not try and extract the op independent from the op dependent).

The next step is to move these out to a trait that could be verified earlier than in the generated method. The first use case is for inferring the return type while constructing the op. At that point you don't have an Operation yet and that ends up in one having to duplicate the same checks, e.g., verify that attribute A is defined before querying A in shape function which requires that duplication. Instead this allows one to invoke a method to verify all the traits and, if this is checked first during verification, then all other traits could use attributes knowing they have been verified.

It is a little bit funny to have these on the adaptor, but I see the adaptor as a place to collect information about the op before the op is constructed (e.g., avoiding stringly typed accessors, verifying what is possible to verify before the op is constructed) while being cheap to use even with constructed op (so layer of indirection between the op constructed/being constructed). And from that point of view it made sense to me.

Differential Revision: https://reviews.llvm.org/D80842
2020-06-05 09:47:37 -07:00
..
Dialects [MLIR][NFC] Rename op trait PolyhedralScope -> AffineScope 2020-05-07 00:19:56 +05:30
includes/img
Rationale [MLIR][docs] Update tutorial language around Op and Operation* and 'opaque' 2020-05-01 11:26:38 -07:00
Tutorials [MLIR] Fix several misc issues in in Toy tutorial 2020-05-11 16:56:47 -07:00
Canonicalization.md Fix broken doc links to QuickstartRewrites.md after move under Tutorials 2020-04-19 04:51:03 +00:00
CMakeLists.txt Remove CMake configuration for Sphinx targets in MLIR 2020-03-12 01:28:38 +00:00
ConversionToLLVMDialect.md [mlir][LLVM] Finer-grained control for C interface emission 2020-04-02 13:07:10 -04:00
DeclarativeRewrites.md [mlir] NFC: fix trivial typo 2020-04-29 14:47:56 +09:00
Diagnostics.md [Support] Move LLD's parallel algorithm wrappers to support 2020-05-05 15:21:05 -07:00
DialectConversion.md [mlir] support materialization for 1-1 type conversions 2020-06-02 13:48:33 +02:00
doxygen-mainpage.dox
doxygen.cfg.in [mlir] NFC: fix trivial typo 2020-04-29 14:47:56 +09:00
EDSC.md [mlir] Change dialect namespace loop->scf 2020-05-13 19:20:21 +02:00
GenericDAGRewriter.md [mlir][docs] Remove the MLIR prefix from several titles. 2020-04-11 14:49:03 -07:00
Interfaces.md [MLIR][docs] Update tutorial language around Op and Operation* and 'opaque' 2020-05-01 11:26:38 -07:00
LangRef.md [mlir][DenseStringElementsAttr] Add support for the Attribute based get* methods. 2020-05-01 16:34:35 -07:00
OpDefinitions.md [mlir] Add verify method to adaptor 2020-06-05 09:47:37 -07:00
Passes.md [MLIR] Add conversion from AtomicRMWOp -> GenericAtomicRMWOp. 2020-05-05 10:32:13 +02:00
PassManagement.md [mlir] Add a new context flag for disabling/enabling multi-threading 2020-05-02 12:32:25 -07:00
Quantization.md [mlir] NFC: fix trivial typo 2020-04-29 14:47:56 +09:00
README.txt
ShapeInference.md [mlir] NFC: fix trivial typo 2020-04-29 14:47:56 +09:00
SymbolsAndSymbolTables.md Fix broken docs links (WritingAPass.md was renamed PassManagement.md) 2020-04-19 04:38:56 +00:00
Traits.md [MLIR][NFC] Rename op trait PolyhedralScope -> AffineScope 2020-05-07 00:19:56 +05:30

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.