[Mlir-commits] [mlir] dd2f50a - [mlir] Improve test coverage for print-op-graph
Jacques Pienaar
llvmlistbot at llvm.org
Sat Feb 27 10:18:56 PST 2021
Author: Jacques Pienaar
Date: 2021-02-27T10:18:38-08:00
New Revision: dd2f50a4d051b2ec797f13f71088f10887fe0709
URL: https://github.com/llvm/llvm-project/commit/dd2f50a4d051b2ec797f13f71088f10887fe0709
DIFF: https://github.com/llvm/llvm-project/commit/dd2f50a4d051b2ec797f13f71088f10887fe0709.diff
LOG: [mlir] Improve test coverage for print-op-graph
Added:
Modified:
mlir/test/Transforms/print-op-graph.mlir
Removed:
################################################################################
diff --git a/mlir/test/Transforms/print-op-graph.mlir b/mlir/test/Transforms/print-op-graph.mlir
index 1c4548e931ca..8ab60508b960 100644
--- a/mlir/test/Transforms/print-op-graph.mlir
+++ b/mlir/test/Transforms/print-op-graph.mlir
@@ -1,12 +1,19 @@
-// RUN: mlir-opt -allow-unregistered-dialect -print-op-graph %s -o %t 2>&1 | FileCheck %s
+// RUN: mlir-opt -allow-unregistered-dialect -mlir-elide-elementsattrs-if-larger=2 -print-op-graph %s -o %t 2>&1 | FileCheck %s
// CHECK-LABEL: digraph "merge_blocks"
+// CHECK{LITERAL}: value: [[...]] : tensor\<2x2xi32\>}
+// CHECK{LITERAL}: value: dense\<1\> : tensor\<5xi32\>}
+// CHECK{LITERAL}: value: dense\<[[0, 1]]\> : tensor\<1x2xi32\>}
func @merge_blocks(%arg0: i32, %arg1 : i32) -> () {
- %0:2 = "test.merge_blocks"() ({
+ %0 = constant dense<[[0, 1], [2, 3]]> : tensor<2x2xi32>
+ %1 = constant dense<1> : tensor<5xi32>
+ %2 = constant dense<[[0, 1]]> : tensor<1x2xi32>
+
+ %3:2 = "test.merge_blocks"() ({
^bb0:
"test.br"(%arg0, %arg1)[^bb1] : (i32, i32) -> ()
^bb1(%arg3 : i32, %arg4 : i32):
"test.return"(%arg3, %arg4) : (i32, i32) -> ()
}) : () -> (i32, i32)
- "test.return"(%0#0, %0#1) : (i32, i32) -> ()
+ "test.return"(%3#0, %3#1) : (i32, i32) -> ()
}
More information about the Mlir-commits
mailing list