summaryrefslogtreecommitdiffstats
path: root/mlir/test/Examples/Toy/Ch5
Commit message (Collapse)AuthorAgeFilesLines
* Fixed typo in Toy tutorial (second var e -> var f)Aart Bik2019-11-271-2/+2
| | | | PiperOrigin-RevId: 282810649
* Cleanup and rewrite Ch-4.md.River Riddle2019-10-211-5/+3
| | | | | | 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-213-28/+32
| | | | | | MulOp now represents an element-wise multiplication instead of a matrix multiplication. PiperOrigin-RevId: 275886774
* NFC: Fix typo : Retur -> ReturnRiver Riddle2019-10-201-1/+1
| | | | PiperOrigin-RevId: 275745931
* Fix invalid transpose in example and add proper verification.River Riddle2019-10-161-36/+36
| | | | | | The transpose in the example had the same result type as its input, which is incorrect. PiperOrigin-RevId: 275186568
* Add Ch.5 of the toy tutorial.River Riddle2019-10-169-111/+145
| | | | | | This chapter adds a partial lowering of toy operations, all but PrintOp, to a combination of the Affine and Std dialects. This chapter focuses on introducing the conversion framework, the benefits of partial lowering, and how easily dialects may co-exist in the IR. PiperOrigin-RevId: 275150649
* Emit LLVM IR equivalent of sizeof when lowering alloc operationsAlex Zinenko2019-10-111-1/+1
| | | | | | | | | | | | | | | | | Originally, the lowering of `alloc` operations has been computing the number of bytes to allocate when lowering based on the properties of MLIR type. This does not take into account type legalization that happens when compiling LLVM IR down to target assembly. This legalization can widen the type, potentially leading to out-of-bounds accesses to `alloc`ed data due to mismatches between address computation that takes the widening into account and allocation that does not. Use the LLVM IR's equivalent of `sizeof` to compute the number of bytes to be allocated: %0 = getelementptr %type* null, %indexType 0 %1 = ptrtoint %type* %0 to %indexType adapted from http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt PiperOrigin-RevId: 274159900
* Change the attribute dictionary syntax to separate name and value with '='.River Riddle2019-06-252-6/+6
| | | | | | | | | | | 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.River Riddle2019-06-252-3/+3
| | | | | | | | | 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
* Update the Parser to support parsing/printing DenseElementAttrs with a splat ↵River Riddle2019-06-191-1/+1
| | | | | | | | | value. The syntax for this is the same as 0-D tensors: dense<tensor<100x100x100xi32>, 10> dense<tensor<1x1x1xi64>, -5> PiperOrigin-RevId: 252907880
* Remove the Toy/* file path from the location check lines. This assumes a ↵River Riddle2019-06-011-27/+27
| | | | | | | | specific file path format that breaks on MSVC. -- PiperOrigin-RevId: 250549223
* Toy tutorial Chapter 5: Lowering to Linalg and LLVMMehdi Amini2019-04-087-0/+189
-- PiperOrigin-RevId: 242606796
OpenPOWER on IntegriCloud