[mlir][toy] Define a FuncOp operation in toy and drop the dependence on FuncOpFuncOp is being moved out of the builtin dialect, and defining a customtoy operation showcases various aspects of defi
[mlir][toy] Define a FuncOp operation in toy and drop the dependence on FuncOpFuncOp is being moved out of the builtin dialect, and defining a customtoy operation showcases various aspects of defining function-like operation(e.g. inlining, passes, etc.).Differential Revision: https://reviews.llvm.org/D121264
show more ...
[MLIR] Fix several misc issues in in Toy tutorialSummary:- Fix comments in several places- Eliminate extra ' in AST dump and adjust tests accordinglyDifferential Revision: https://reviews.llvm.
[MLIR] Fix several misc issues in in Toy tutorialSummary:- Fix comments in several places- Eliminate extra ' in AST dump and adjust tests accordinglyDifferential Revision: https://reviews.llvm.org/D78399
[mlir][Tutorial] Make parsing an empty file print a better error.Summary:Previously, we would, for an empty file, print the somewhat confusing Assertion `tok == curTok [...]' failed.With this c
[mlir][Tutorial] Make parsing an empty file print a better error.Summary:Previously, we would, for an empty file, print the somewhat confusing Assertion `tok == curTok [...]' failed.With this change, we now print Parse error [...]: expected 'def' [...]This only affects the parser from chapters 1-6, since the more advancedchapter 7 parser is actually able to generate an empty module from anempty file. Nonetheless, this commit also adds the additional check tothe chapter 7 parser, for consistency.Differential Revision: https://reviews.llvm.org/D75534
[mlir][Tutorial] Add a section to Toy Ch.2 detailing the custom assembly format.Summary:This details the C++ format as well as the new declarative format. This has been one of the major missing pi
[mlir][Tutorial] Add a section to Toy Ch.2 detailing the custom assembly format.Summary:This details the C++ format as well as the new declarative format. This has been one of the major missing pieces from the toy tutorial.Differential Revision: https://reviews.llvm.org/D74938
Fixed typo in Toy tutorial (second var e -> var f)PiperOrigin-RevId: 282810649
NFC: Fix remaining usages of MulOp as matrix multiplication.MulOp now represents an element-wise multiplication instead of a matrix multiplication.PiperOrigin-RevId: 275886774
NFC: Fix typo : Retur -> ReturnPiperOrigin-RevId: 275745931
Update comments in ast.toyPiperOrigin-RevId: 275084969
Merge Ch3 of the Toy tutorial into chapter 2.This effectively rewrites Ch.2 to introduce dialects, operations, and registration instead of deferring to Ch.3. This allows for introducing the best pr
Merge Ch3 of the Toy tutorial into chapter 2.This effectively rewrites Ch.2 to introduce dialects, operations, and registration instead of deferring to Ch.3. This allows for introducing the best practices up front(using ODS, registering operations, etc.), and limits the opaque API to the chapter document instead of the code.PiperOrigin-RevId: 274724289
Update Ch.2 of the Toy tutorial.The code and documentation for this chapter of the tutorial have been updated to follow the new flow. The toy 'array' type has been replaced by usages of the MLIR te
Update Ch.2 of the Toy tutorial.The code and documentation for this chapter of the tutorial have been updated to follow the new flow. The toy 'array' type has been replaced by usages of the MLIR tensor type. The code has also been cleaned up and modernized.Closes tensorflow/mlir#101PiperOrigin-RevId: 265744086
Change the attribute dictionary syntax to separate name and value with '='.The current syntax separates the name and value with ':', but ':' is already overloaded by several other things(e.g. trail
Change the attribute dictionary syntax to separate name and value with '='.The current syntax separates the name and value with ':', but ':' is already overloaded by several other things(e.g. trailing types). This makes the syntax difficult to parse in some situtations:Old: "foo: 10 : i32"New: "foo = 10 : i32"PiperOrigin-RevId: 255097928
Modify the syntax of the the ElementsAttrs to print the type as a colon type.This is the standard syntax for types on operations, and is also already used by IntegerAttr and FloatAttr.Example:
Modify the syntax of the the ElementsAttrs to print the type as a colon type.This is the standard syntax for types on operations, and is also already used by IntegerAttr and FloatAttr.Example: dense<5> : tensor<i32> dense<[3]> : tensor<1xi32>PiperOrigin-RevId: 255069157
Remove the Toy/* file path from the location check lines. This assumes a specific file path format that breaks on MSVC.--PiperOrigin-RevId: 250549223
Change the asmprinter to use pretty syntax for dialect types when it can, making the IR dumps much nicer. This is part 2/3 of the path to making dialect types more nice. Part 3/3 will s
Change the asmprinter to use pretty syntax for dialect types when it can, making the IR dumps much nicer. This is part 2/3 of the path to making dialect types more nice. Part 3/3 will slightly generalize the set of characters allowed in pretty types and make it more principled.--PiperOrigin-RevId: 242249955
NFC: Fix a few typos in the tutorials and one in the comment of FunctionAttr::dropFunctionReference.--PiperOrigin-RevId: 242050934
Chapter 3 for Toy tutorial: introduction of a dialect--PiperOrigin-RevId: 241849162
Chapter 2 of the Toy tutorial This introduces a basic MLIRGen through straight AST traversal, without dialect registration at this point.--PiperOrigin-RevId: 241588354