[PATCH] D75263: Fix/Clarify parts of MLIR toy tutorial chapter 6+7
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 17:59:39 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG45d522d691cc: [mlir] Fix/Clarify parts of MLIR toy tutorial chapter 6+7 (authored by matthiaskramm, committed by rriddle).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75263/new/
https://reviews.llvm.org/D75263
Files:
mlir/docs/Tutorials/Toy/Ch-6.md
mlir/docs/Tutorials/Toy/Ch-7.md
Index: mlir/docs/Tutorials/Toy/Ch-7.md
===================================================================
--- mlir/docs/Tutorials/Toy/Ch-7.md
+++ mlir/docs/Tutorials/Toy/Ch-7.md
@@ -74,7 +74,7 @@
DEFINE_SYM_KIND_RANGE(TOY) // Toy language (tutorial) Dialect
// The following ranges are reserved for experimenting with MLIR dialects in a
-// private context without having to register them here.
+// private context.
DEFINE_SYM_KIND_RANGE(PRIVATE_EXPERIMENTAL_0)
```
@@ -401,9 +401,7 @@
This new operation materializes the Nth element of a `struct` value.
```mlir
- %0 = toy.struct_constant [
- dense<[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]> : tensor<2x3xf64>
- ] : !toy.struct<tensor<*xf64>>
+ // Using %0 from above
%1 = toy.struct_access %0[0] : !toy.struct<tensor<*xf64>> -> tensor<*xf64>
```
@@ -481,9 +479,10 @@
```
We have several `toy.struct_access` operations that access into a
-`toy.struct_constant`. As detailed in [chapter 3](Ch-3.md), we can add folders
-for these `toy` operations by setting the `hasFolder` bit on the operation
-definition and providing a definition of the `*Op::fold` method.
+`toy.struct_constant`. As detailed in [chapter 3](Ch-3.md) (FoldConstantReshape),
+we can add folders for these `toy` operations by setting the `hasFolder` bit
+on the operation definition and providing a definition of the `*Op::fold`
+method.
```c++
/// Fold constants.
Index: mlir/docs/Tutorials/Toy/Ch-6.md
===================================================================
--- mlir/docs/Tutorials/Toy/Ch-6.md
+++ mlir/docs/Tutorials/Toy/Ch-6.md
@@ -94,7 +94,7 @@
mlir::populateLoopToStdConversionPatterns(patterns, &getContext());
mlir::populateStdToLLVMConversionPatterns(typeConverter, patterns);
- // The only remaining operation to lower from the `toy` dialect, is the
+ // The only remaining operation, to lower from the `toy` dialect, is the
// PrintOp.
patterns.insert<PrintOpLowering>(&getContext());
```
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75263.247152.patch
Type: text/x-patch
Size: 1976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200228/bfe6b15d/attachment.bin>
More information about the llvm-commits
mailing list