[llvm-branch-commits] [mlir] 46294ff - [MLIR] Update tutorial to add missing tests and bring directory paths and code snippets up to date.

Lucy Fox via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Apr 17 18:02:39 PDT 2020


Author: Lucy Fox
Date: 2020-04-17T17:58:16-07:00
New Revision: 46294ffd1c083151f04a94668aa4bbf1fd415e9d

URL: https://github.com/llvm/llvm-project/commit/46294ffd1c083151f04a94668aa4bbf1fd415e9d
DIFF: https://github.com/llvm/llvm-project/commit/46294ffd1c083151f04a94668aa4bbf1fd415e9d.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 llvm-branch-commits mailing list