[Mlir-commits] [mlir] a0d5e54 - [MLIR] Update tutorial to add missing tests and bring directory paths and code snippets up to date.

Lucy Fox llvmlistbot at llvm.org
Fri Apr 17 20:16:14 PDT 2020


Author: Lucy Fox
Date: 2020-04-17T20:15:16-07:00
New Revision: a0d5e5496621700b26d234a948f9c99b08a8a319

URL: https://github.com/llvm/llvm-project/commit/a0d5e5496621700b26d234a948f9c99b08a8a319
DIFF: https://github.com/llvm/llvm-project/commit/a0d5e5496621700b26d234a948f9c99b08a8a319.diff

LOG: [MLIR] Update tutorial to add missing tests and bring directory paths and code snippets up to date.

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/test/Examples/Toy/Ch5/trivial_reshape.toy b/mlir/test/Examples/Toy/Ch5/trivial_reshape.toy
index 453efa3ef312..1addb06022e0 100644
--- a/mlir/test/Examples/Toy/Ch5/trivial_reshape.toy
+++ b/mlir/test/Examples/Toy/Ch5/trivial_reshape.toy
@@ -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

diff  --git a/mlir/test/Examples/Toy/Ch6/trivial_reshape.toy b/mlir/test/Examples/Toy/Ch6/trivial_reshape.toy
index 453efa3ef312..17832ace3782 100644
--- a/mlir/test/Examples/Toy/Ch6/trivial_reshape.toy
+++ b/mlir/test/Examples/Toy/Ch6/trivial_reshape.toy
@@ -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

diff  --git a/mlir/test/Examples/Toy/Ch7/trivial_reshape.toy b/mlir/test/Examples/Toy/Ch7/trivial_reshape.toy
index 453efa3ef312..5ca8c4b6e41a 100644
--- a/mlir/test/Examples/Toy/Ch7/trivial_reshape.toy
+++ b/mlir/test/Examples/Toy/Ch7/trivial_reshape.toy
@@ -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


        


More information about the Mlir-commits mailing list