Skip to content

Commit 36316b2

Browse files
authored
Add tests
1 parent 106e367 commit 36316b2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mlir/test/Dialect/Tosa/canonicalize.mlir

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,17 @@ func.func @pad_noop(%arg0: tensor<?x?xf32>) -> tensor<?x?xf32> {
217217

218218
// -----
219219

220+
// CHECK-LABEL: @pad_noop_padding_mismatch_nofold
221+
func.func @pad_noop_padding_mismatch_nofold(%arg0: tensor<?x?xf32>) -> tensor<?x?xf32> {
222+
// CHECK: %[[PAD:.+]] = tosa.pad
223+
// CHECK: return %[[PAD]]
224+
%0 = "tosa.const"() { value = dense_resource<__elided__> : tensor<2x2xi32>} : () -> tensor<2x2xi32>
225+
%1 = tosa.pad %arg0, %0 : (tensor<?x?xf32>, tensor<2x2xi32>) -> tensor<?x?xf32>
226+
return %1 : tensor<?x?xf32>
227+
}
228+
229+
// -----
230+
220231
// CHECK-LABEL: @pad_noop_type_mismatch_nofold
221232
func.func @pad_noop_type_mismatch_nofold(%arg0: tensor<10xf32>) -> tensor<?xf32> {
222233
// CHECK: %[[PAD:.+]] = tosa.pad

0 commit comments

Comments
 (0)