Skip to content

Commit ba2f37e

Browse files
FruitClovergithub-actions[bot]
authored andcommitted
Automerge: [mlir] Fix mlir-runner memref-reshape test with unranked inputs (#165902)
Were using ranked before.
2 parents afe2c80 + 23ef59a commit ba2f37e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mlir/test/mlir-runner/memref-reshape.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ func.func @reshape_ranked_memref_to_ranked(%input : memref<2x3xf32>,
6565
func.func @reshape_unranked_memref_to_ranked(%input : memref<2x3xf32>,
6666
%shape : memref<2xindex>) {
6767
%unranked_input = memref.cast %input : memref<2x3xf32> to memref<*xf32>
68-
%output = memref.reshape %input(%shape)
69-
: (memref<2x3xf32>, memref<2xindex>) -> memref<?x?xf32>
68+
%output = memref.reshape %unranked_input(%shape)
69+
: (memref<*xf32>, memref<2xindex>) -> memref<?x?xf32>
7070

7171
%unranked_output = memref.cast %output : memref<?x?xf32> to memref<*xf32>
7272
call @printMemrefF32(%unranked_output) : (memref<*xf32>) -> ()
@@ -95,8 +95,8 @@ func.func @reshape_unranked_memref_to_unranked(%input : memref<2x3xf32>,
9595
%shape : memref<2xindex>) {
9696
%unranked_input = memref.cast %input : memref<2x3xf32> to memref<*xf32>
9797
%dyn_size_shape = memref.cast %shape : memref<2xindex> to memref<?xindex>
98-
%output = memref.reshape %input(%dyn_size_shape)
99-
: (memref<2x3xf32>, memref<?xindex>) -> memref<*xf32>
98+
%output = memref.reshape %unranked_input(%dyn_size_shape)
99+
: (memref<*xf32>, memref<?xindex>) -> memref<*xf32>
100100

101101
call @printMemrefF32(%output) : (memref<*xf32>) -> ()
102102
// CHECK: rank = 2 offset = 0 sizes = [3, 2] strides = [2, 1] data =

0 commit comments

Comments
 (0)