Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/xtc/backends/mlir/MlirCompilerPasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ def _generate_scheduling(self) -> OpResult:
assert self._named_sequence is not None
handle = None
for schedule in self._nodes_schedules:
# Skip linalg.fill
if schedule.node_name[-1] == "0": # identify with naming convention
continue
self._create_sdist_meshes(schedule)
handle = structured_match(
results_=transform.AnyOpType.get(),
Expand Down
240 changes: 87 additions & 153 deletions tests/filecheck/backends/padding/test_gen_pad_dict_conv2d_mlir.py

Large diffs are not rendered by default.

211 changes: 80 additions & 131 deletions tests/filecheck/backends/padding/test_gen_pad_int_matmul_unpad_mlir.py

Large diffs are not rendered by default.

238 changes: 86 additions & 152 deletions tests/filecheck/backends/padding/test_gen_pad_tuple_conv2d_mlir.py

Large diffs are not rendered by default.

211 changes: 80 additions & 131 deletions tests/filecheck/backends/padding/test_gen_pad_tuple_matmul_unpad_mlir.py

Large diffs are not rendered by default.

232 changes: 83 additions & 149 deletions tests/filecheck/backends/padding/test_pad_constant_conv2d_mlir.py

Large diffs are not rendered by default.

232 changes: 83 additions & 149 deletions tests/filecheck/backends/padding/test_pad_conv2d_mlir.py

Large diffs are not rendered by default.

215 changes: 82 additions & 133 deletions tests/filecheck/backends/padding/test_pad_matmul_unpad_mlir.py

Large diffs are not rendered by default.

215 changes: 82 additions & 133 deletions tests/filecheck/backends/padding/test_pad_tuple_matmul_unpad_mlir.py

Large diffs are not rendered by default.

145 changes: 56 additions & 89 deletions tests/filecheck/backends/test_conv2d_mini_mlir.py

Large diffs are not rendered by default.

67 changes: 23 additions & 44 deletions tests/filecheck/backends/test_conv2d_r181_mlir.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,41 +60,32 @@
# CHECK-NEXT: transform.yield
# CHECK-NEXT: }
# CHECK-NEXT: transform.named_sequence @__transform_main(%arg0: !transform.any_op {transform.readonly}) {
# CHECK-NEXT: %0 = transform.structured.match attributes {__xtc_id_O_0_} in %arg0 : (!transform.any_op) -> !transform.any_op
# CHECK-NEXT: %tiled_linalg_op, %loops = transform.structured.tile_using_for %0 tile_sizes [1, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: %0 = transform.structured.match attributes {__xtc_id_O_} in %arg0 : (!transform.any_op) -> !transform.any_op
# CHECK-NEXT: %tiled_linalg_op, %loops = transform.structured.tile_using_for %0 tile_sizes [1, 0, 0, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops "./b" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_0, %loops_1 = transform.structured.tile_using_for %tiled_linalg_op tile_sizes [0, 1, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: %tiled_linalg_op_0, %loops_1 = transform.structured.tile_using_for %tiled_linalg_op tile_sizes [0, 1, 0, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_1 "./h" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_2, %loops_3 = transform.structured.tile_using_for %tiled_linalg_op_0 tile_sizes [0, 0, 1, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: %tiled_linalg_op_2, %loops_3 = transform.structured.tile_using_for %tiled_linalg_op_0 tile_sizes [0, 0, 4, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_3 "./w" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_4, %loops_5 = transform.structured.tile_using_for %tiled_linalg_op_2 tile_sizes [0, 0, 0, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: %tiled_linalg_op_4, %loops_5 = transform.structured.tile_using_for %tiled_linalg_op_2 tile_sizes [0, 0, 0, 16, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_5 "./f" : !transform.any_op
# CHECK-NEXT: %1 = transform.structured.match attributes {__xtc_id_O_} in %arg0 : (!transform.any_op) -> !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_6, %loops_7 = transform.structured.tile_using_for %1 tile_sizes [1, 0, 0, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_7 "./b" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_8, %loops_9 = transform.structured.tile_using_for %tiled_linalg_op_6 tile_sizes [0, 1, 0, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_9 "./h" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_10, %loops_11 = transform.structured.tile_using_for %tiled_linalg_op_8 tile_sizes [0, 0, 4, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_11 "./w" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_12, %loops_13 = transform.structured.tile_using_for %tiled_linalg_op_10 tile_sizes [0, 0, 0, 16, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_13 "./f" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_14, %loops_15 = transform.structured.tile_using_for %tiled_linalg_op_12 tile_sizes [0, 0, 0, 0, 1, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_15 "./r" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_16, %loops_17 = transform.structured.tile_using_for %tiled_linalg_op_14 tile_sizes [0, 0, 0, 0, 0, 1, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_17 "./s" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_18, %loops_19 = transform.structured.tile_using_for %tiled_linalg_op_16 tile_sizes [0, 0, 0, 0, 0, 0, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_19 "./c" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_20, %loops_21 = transform.structured.tile_using_for %tiled_linalg_op_18 tile_sizes [0, 0, 1, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_21 "./w1" : !transform.any_op
# CHECK-NEXT: transform.include @_vecto failures(suppress) (%tiled_linalg_op_20) : (!transform.any_op) -> ()
# CHECK-NEXT: transform.loop.unroll %loops_21 {factor = 4 : i64} : !transform.any_op
# CHECK-NEXT: transform.loop.unroll %loops_19 {factor = 3 : i64} : !transform.any_op
# CHECK-NEXT: %2 = transform.get_parent_op %loops_7 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
# CHECK-NEXT: transform.apply_patterns to %2 {
# CHECK-NEXT: %tiled_linalg_op_6, %loops_7 = transform.structured.tile_using_for %tiled_linalg_op_4 tile_sizes [0, 0, 0, 0, 1, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_7 "./r" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_8, %loops_9 = transform.structured.tile_using_for %tiled_linalg_op_6 tile_sizes [0, 0, 0, 0, 0, 1, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_9 "./s" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_10, %loops_11 = transform.structured.tile_using_for %tiled_linalg_op_8 tile_sizes [0, 0, 0, 0, 0, 0, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_11 "./c" : !transform.any_op
# CHECK-NEXT: %tiled_linalg_op_12, %loops_13 = transform.structured.tile_using_for %tiled_linalg_op_10 tile_sizes [0, 0, 1, 0, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
# CHECK-NEXT: transform.annotate %loops_13 "./w1" : !transform.any_op
# CHECK-NEXT: transform.include @_vecto failures(suppress) (%tiled_linalg_op_12) : (!transform.any_op) -> ()
# CHECK-NEXT: transform.loop.unroll %loops_13 {factor = 4 : i64} : !transform.any_op
# CHECK-NEXT: transform.loop.unroll %loops_11 {factor = 3 : i64} : !transform.any_op
# CHECK-NEXT: %1 = transform.get_parent_op %loops {isolated_from_above} : (!transform.any_op) -> !transform.any_op
# CHECK-NEXT: transform.apply_patterns to %1 {
# CHECK-NEXT: transform.apply_patterns.vector.reduction_to_contract
# CHECK-NEXT: transform.apply_patterns.vector.transfer_permutation_patterns
# CHECK-NEXT: } : !transform.any_op
# CHECK-NEXT: transform.apply_patterns to %2 {
# CHECK-NEXT: transform.apply_patterns to %1 {
# CHECK-NEXT: transform.apply_patterns.vector.lower_outerproduct
# CHECK-NEXT: transform.apply_patterns.vector.lower_contraction
# CHECK-NEXT: } : !transform.any_op
Expand All @@ -114,25 +105,13 @@
# CHECK-NEXT: %c2 = arith.constant 2 : index
# CHECK-NEXT: %c7 = arith.constant 7 : index
# CHECK-NEXT: %c16 = arith.constant 16 : index
# CHECK-NEXT: %c4 = arith.constant 4 : index
# CHECK-NEXT: %c64 = arith.constant 64 : index
# CHECK-NEXT: %c4 = arith.constant 4 : index
# CHECK-NEXT: %c112 = arith.constant 112 : index
# CHECK-NEXT: %cst = arith.constant 0.000000e+00 : f32
# CHECK-NEXT: %c0 = arith.constant 0 : index
# CHECK-NEXT: %c1 = arith.constant 1 : index
# CHECK-NEXT: scf.for %arg3 = %c0 to %c1 step %c1 {
# CHECK-NEXT: %subview = memref.subview %arg2[%arg3, 0, 0, 0] [1, 112, 112, 64] [1, 1, 1, 1] : memref<1x112x112x64xf32> to memref<1x112x112x64xf32, strided<[802816, 7168, 64, 1], offset: ?>>
# CHECK-NEXT: scf.for %arg4 = %c0 to %c112 step %c1 {
# CHECK-NEXT: %subview_0 = memref.subview %subview[0, %arg4, 0, 0] [1, 1, 112, 64] [1, 1, 1, 1] : memref<1x112x112x64xf32, strided<[802816, 7168, 64, 1], offset: ?>> to memref<1x1x112x64xf32, strided<[802816, 7168, 64, 1], offset: ?>>
# CHECK-NEXT: scf.for %arg5 = %c0 to %c112 step %c1 {
# CHECK-NEXT: %subview_1 = memref.subview %subview_0[0, 0, %arg5, 0] [1, 1, 1, 64] [1, 1, 1, 1] : memref<1x1x112x64xf32, strided<[802816, 7168, 64, 1], offset: ?>> to memref<1x1x1x64xf32, strided<[802816, 7168, 64, 1], offset: ?>>
# CHECK-NEXT: scf.for %arg6 = %c0 to %c64 step %c1 {
# CHECK-NEXT: %subview_2 = memref.subview %subview_1[0, 0, 0, %arg6] [1, 1, 1, 1] [1, 1, 1, 1] : memref<1x1x1x64xf32, strided<[802816, 7168, 64, 1], offset: ?>> to memref<1x1x1x1xf32, strided<[802816, 7168, 64, 1], offset: ?>>
# CHECK-NEXT: linalg.fill {__xtc_id_O_0_} ins(%cst : f32) outs(%subview_2 : memref<1x1x1x1xf32, strided<[802816, 7168, 64, 1], offset: ?>>)
# CHECK-NEXT: } {"./f"}
# CHECK-NEXT: } {"./w"}
# CHECK-NEXT: } {"./h"}
# CHECK-NEXT: } {"./b"}
# CHECK-NEXT: %c0 = arith.constant 0 : index
# CHECK-NEXT: %cst = arith.constant 0.000000e+00 : f32
# CHECK-NEXT: linalg.fill {__xtc_id_O_0_} ins(%cst : f32) outs(%arg2 : memref<1x112x112x64xf32>)
# CHECK-NEXT: scf.for %arg3 = %c0 to %c1 step %c1 {
# CHECK-NEXT: %subview = memref.subview %arg0[%arg3, 0, 0, 0] [1, 229, 229, 3] [1, 1, 1, 1] : memref<1x230x230x3xf32> to memref<1x229x229x3xf32, strided<[158700, 690, 3, 1], offset: ?>>
# CHECK-NEXT: %subview_0 = memref.subview %arg1[0, 0, 0, 0] [7, 7, 3, 64] [1, 1, 1, 1] : memref<7x7x3x64xf32> to memref<7x7x3x64xf32, strided<[1344, 192, 64, 1]>>
Expand Down
Loading