[MLIR] Update tutorial to add missing tests and bring directory paths and code snippe...
authorLucy Fox <lucy.r.fox@gmail.com>
Sat, 18 Apr 2020 00:41:51 +0000 (17:41 -0700)
committerLucy Fox <lucy.r.fox@gmail.com>
Sat, 18 Apr 2020 03:15:16 +0000 (20:15 -0700)
Summary:
The tests referred to in Chapter 3 of the tutorial were missing from the tutorial test
directory; this adds those missing tests. This also cleans up some stale directory paths and code
snippets used throughout the tutorial.

Differential Revision: https://reviews.llvm.org/D76809

mlir/test/Examples/Toy/Ch5/trivial_reshape.toy
mlir/test/Examples/Toy/Ch6/trivial_reshape.toy
mlir/test/Examples/Toy/Ch7/trivial_reshape.toy

index 453efa3..1addb06 100644 (file)
@@ -1,4 +1,4 @@
-# RUN: toyc-ch4 %s -emit=mlir -opt 2>&1 | FileCheck %s
+# RUN: toyc-ch5 %s -emit=mlir -opt 2>&1 | FileCheck %s
 
 def main() {
   var a<2,1> = [1, 2];
@@ -13,4 +13,4 @@ def main() {
 # CHECK-SAME:          [1.000000e+00], [2.000000e+00]
 # CHECK-SAME:          ]> : tensor<2x1xf64>
 # CHECK-NEXT:    toy.print [[VAL_0]] : tensor<2x1xf64>
-# CHECK-NEXT:    toy.return
\ No newline at end of file
+# CHECK-NEXT:    toy.return
index 453efa3..17832ac 100644 (file)
@@ -1,4 +1,4 @@
-# RUN: toyc-ch4 %s -emit=mlir -opt 2>&1 | FileCheck %s
+# RUN: toyc-ch6 %s -emit=mlir -opt 2>&1 | FileCheck %s
 
 def main() {
   var a<2,1> = [1, 2];
@@ -13,4 +13,4 @@ def main() {
 # CHECK-SAME:          [1.000000e+00], [2.000000e+00]
 # CHECK-SAME:          ]> : tensor<2x1xf64>
 # CHECK-NEXT:    toy.print [[VAL_0]] : tensor<2x1xf64>
-# CHECK-NEXT:    toy.return
\ No newline at end of file
+# CHECK-NEXT:    toy.return
index 453efa3..5ca8c4b 100644 (file)
@@ -1,4 +1,4 @@
-# RUN: toyc-ch4 %s -emit=mlir -opt 2>&1 | FileCheck %s
+# RUN: toyc-ch7 %s -emit=mlir -opt 2>&1 | FileCheck %s
 
 def main() {
   var a<2,1> = [1, 2];
@@ -13,4 +13,4 @@ def main() {
 # CHECK-SAME:          [1.000000e+00], [2.000000e+00]
 # CHECK-SAME:          ]> : tensor<2x1xf64>
 # CHECK-NEXT:    toy.print [[VAL_0]] : tensor<2x1xf64>
-# CHECK-NEXT:    toy.return
\ No newline at end of file
+# CHECK-NEXT:    toy.return