summaryrefslogtreecommitdiffstats
path: root/mlir/examples/toy/Ch6
Commit message (Collapse)AuthorAgeFilesLines
* [MLIR] Fix broken link locations after move to monorepoDaniel Galvez2020-01-141-1/+1
| | | | | | | | | | I used the codemod python tool to do this with the following commands: codemod 'tensorflow/mlir/blob/master/include' 'llvm/llvm-project/blob/master/mlir/include' codemod 'tensorflow/mlir/blob/master' 'llvm/llvm-project/blob/master/mlir' codemod 'tensorflow/mlir' 'llvm-project/llvm' Differential Revision: https://reviews.llvm.org/D72244
* [mlir] NFC: Remove Value::operator* and Value::operator-> now that Value is ↵River Riddle2020-01-113-12/+11
| | | | | | | | | | properly value-typed. Summary: These were temporary methods used to simplify the transition. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D72548
* NFC: Replace ValuePtr with Value and remove it now that Value is value-typed.River Riddle2019-12-236-62/+59
| | | | | | ValuePtr was a temporary typedef during the transition to a value-typed Value. PiperOrigin-RevId: 286945714
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-2319-247/+76
| | | | PiperOrigin-RevId: 286906740
* NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to ↵River Riddle2019-12-226-61/+63
| | | | | | | | | | Value being value-typed. This is an initial step to refactoring the representation of OpResult as proposed in: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ This change will make it much simpler to incrementally transition all of the existing code to use value-typed semantics. PiperOrigin-RevId: 286844725
* NFC: Use this-> to appease GCC bug related to template lambda.River Riddle2019-12-171-1/+1
| | | | | | | GCC is unable to properly implicitly capture 'this' in generic lambdas. This bug is not fixed until 7.1.0: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67274 PiperOrigin-RevId: 286083427
* NFC: Use TypeSwitch to simplify existing code.River Riddle2019-12-171-14/+10
| | | | PiperOrigin-RevId: 286066371
* Fix minor spelling tweaks.shanshanpt2019-12-091-1/+1
| | | | | | | Closes tensorflow/mlir#306 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/306 from shanshanpt:master 11430c2131281d84a432f45e854e29917b336e8d PiperOrigin-RevId: 284613648
* Minor spelling tweaksKazuaki Ishizaki2019-12-091-1/+1
| | | | | | Closes tensorflow/mlir#304 PiperOrigin-RevId: 284568358
* minor spelling tweaksKazuaki Ishizaki2019-12-041-2/+2
| | | | | | | Closes tensorflow/mlir#250 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/250 from kiszk:spelling_tweaks_201911 50fc04443723190b764e824b6fcd2469fecb56e6 PiperOrigin-RevId: 283733032
* Introduce Linkage attribute to the LLVM dialectAlex Zinenko2019-12-021-2/+3
| | | | | | | | | | | LLVM IR supports linkage on global objects such as global variables and functions. Introduce the Linkage attribute into the LLVM dialect, backed by an integer storage. Use this attribute on LLVM::GlobalOp and make it mandatory. Implement parsing/printing of the attribute and conversion to LLVM IR. See tensorflow/mlir#277. PiperOrigin-RevId: 283309328
* NFC: Remove unnecessarily guarded tablegen includes.River Riddle2019-11-223-9/+0
| | | | | | Support for including a file multiple times was added in tablegen, removing the need for these extra guards. This is because we already insert c/c++ style header guards within each of the specific .td files. PiperOrigin-RevId: 282076728
* Move Affine to Standard conversion to lib/ConversionAlex Zinenko2019-11-142-1/+3
| | | | | | | This is essentially a dialect conversion and conceptually belongs to conversions. PiperOrigin-RevId: 280460034
* Add support for nested symbol references.River Riddle2019-11-112-4/+4
| | | | | | | | | | | | | | | | | | This change allows for adding additional nested references to a SymbolRefAttr to allow for further resolving a symbol if that symbol also defines a SymbolTable. If a referenced symbol also defines a symbol table, a nested reference can be used to refer to a symbol within that table. Nested references are printed after the main reference in the following form: symbol-ref-attribute ::= symbol-ref-id (`::` symbol-ref-id)* Example: module @reference { func @nested_reference() } my_reference_op @reference::@nested_reference Given that SymbolRefAttr is now more general, the existing functionality centered around a single reference is moved to a derived class FlatSymbolRefAttr. Followup commits will add support to lookups, rauw, etc. for scoped references. PiperOrigin-RevId: 279860501
* Fix segfault (nullptr dereference) when passing a non-existent file to the ↵Mehdi Amini2019-11-091-0/+2
| | | | | | | | Toy tutorial compiler Fix tensorflow/mlir#229 PiperOrigin-RevId: 279557863
* NFC: Tidy up the implementation of operations in the Toy tutorialRiver Riddle2019-11-062-40/+50
| | | | | | Use header blocks to separate operation implementations, and switch the build methods to be out-of-line when possible. PiperOrigin-RevId: 278982913
* NFC: Uniformize parser naming scheme in Toy tutorial to camelCase and tidy a ↵River Riddle2019-11-066-220/+206
| | | | | | bit of the implementation. PiperOrigin-RevId: 278982817
* NFC: Use #ifndef in various .td files instead of #ifdef and #elseLei Zhang2019-10-312-10/+5
| | | | | | | | | | Upstream LLVM gained support for #ifndef with https://reviews.llvm.org/D61888 This is changed mechanically via the following command: find . -name "*.td" -exec sed -i -e ':a' -e 'N' -e '$!ba' -e 's/#ifdef \([A-Z_]*\)\n#else/#ifndef \1/g' {} \; PiperOrigin-RevId: 277789427
* Convert the Canonicalize and CSE passes to generic Operation Passes.River Riddle2019-10-241-7/+10
| | | | | | This allows for them to be used on other non-function, or even other function-like, operations. The algorithms are already generic, so this is simply changing the derived pass type. The majority of this change is just ensuring that the nesting of these passes remains the same, as the pass manager won't auto-nest them anymore. PiperOrigin-RevId: 276573038
* NFC: Remove references to the toy.generic attribute.River Riddle2019-10-231-7/+1
| | | | | | This was used for shape inference in the previous tutorial flow. PiperOrigin-RevId: 276351916
* Cleanup and rewrite Ch-4.md.River Riddle2019-10-212-0/+6
| | | | | | This change rewrites Ch-4.md to introduced interfaces in a detailed step-by-step manner, adds examples, and fixes some errors. PiperOrigin-RevId: 275887017
* NFC: Fix remaining usages of MulOp as matrix multiplication.River Riddle2019-10-211-20/+1
| | | | | | MulOp now represents an element-wise multiplication instead of a matrix multiplication. PiperOrigin-RevId: 275886774
* Fix minor spelling tweaks (NFC)Kazuaki Ishizaki2019-10-203-5/+5
| | | | | | Closes tensorflow/mlir#175 PiperOrigin-RevId: 275726876
* Use new eraseOp instead of replaceOp with empty valuesGeoffrey Martin-Noble2019-10-191-1/+1
| | | | PiperOrigin-RevId: 275631166
* NFC: Remove trivial builder get methods.River Riddle2019-10-172-8/+8
| | | | | | These don't add any value, and some are even more restrictive than the respective static 'get' method. PiperOrigin-RevId: 275391240
* Add Ch.6 of the Toy tutorial.River Riddle2019-10-1722-0/+3679
This chapters introduces the notion of a full conversion, and adds support for lowering down to the LLVM dialect, LLVM IR, and thus code generation. PiperOrigin-RevId: 275337786
OpenPOWER on IntegriCloud