diff options
author | River Riddle <riddleriver@gmail.com> | 2022-03-08 16:21:07 -0800 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2022-03-15 14:55:51 -0700 |
commit | ee2c6cd9069fe0d8e7386ce53300e7645e4db792 (patch) | |
tree | eafb91f1eae7f9a9214000b8a751a329bf432676 /mlir/test/Examples/Toy/Ch7/codegen.toy | |
parent | f96a8675cd29776ca39bb76133ee9167f5001f17 (diff) | |
download | llvm-ee2c6cd9069fe0d8e7386ce53300e7645e4db792.zip llvm-ee2c6cd9069fe0d8e7386ce53300e7645e4db792.tar.gz llvm-ee2c6cd9069fe0d8e7386ce53300e7645e4db792.tar.bz2 |
[mlir][toy] Define a FuncOp operation in toy and drop the dependence on FuncOp
FuncOp is being moved out of the builtin dialect, and defining a custom
toy operation showcases various aspects of defining function-like operation
(e.g. inlining, passes, etc.).
Differential Revision: https://reviews.llvm.org/D121264
Diffstat (limited to 'mlir/test/Examples/Toy/Ch7/codegen.toy')
-rw-r--r-- | mlir/test/Examples/Toy/Ch7/codegen.toy | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/test/Examples/Toy/Ch7/codegen.toy b/mlir/test/Examples/Toy/Ch7/codegen.toy index 5792396..af6a3bd 100644 --- a/mlir/test/Examples/Toy/Ch7/codegen.toy +++ b/mlir/test/Examples/Toy/Ch7/codegen.toy @@ -13,14 +13,14 @@ def main() { print(d); } -# CHECK-LABEL: func private @multiply_transpose( +# CHECK-LABEL: toy.func private @multiply_transpose( # CHECK-SAME: [[VAL_0:%.*]]: tensor<*xf64>, [[VAL_1:%.*]]: tensor<*xf64>) -> tensor<*xf64> # CHECK: [[VAL_2:%.*]] = toy.transpose([[VAL_0]] : tensor<*xf64>) to tensor<*xf64> # CHECK-NEXT: [[VAL_3:%.*]] = toy.transpose([[VAL_1]] : tensor<*xf64>) to tensor<*xf64> # CHECK-NEXT: [[VAL_4:%.*]] = toy.mul [[VAL_2]], [[VAL_3]] : tensor<*xf64> # CHECK-NEXT: toy.return [[VAL_4]] : tensor<*xf64> -# CHECK-LABEL: func @main() +# CHECK-LABEL: toy.func @main() # CHECK-NEXT: [[VAL_5:%.*]] = toy.constant dense<{{\[\[}}1.000000e+00, 2.000000e+00, 3.000000e+00], [4.000000e+00, 5.000000e+00, 6.000000e+00]]> : tensor<2x3xf64> # CHECK-NEXT: [[VAL_6:%.*]] = toy.reshape([[VAL_5]] : tensor<2x3xf64>) to tensor<2x3xf64> # CHECK-NEXT: [[VAL_7:%.*]] = toy.constant dense<[1.000000e+00, 2.000000e+00, 3.000000e+00, 4.000000e+00, 5.000000e+00, 6.000000e+00]> : tensor<6xf64> |