Skip to content

Commit 73cf21f

Browse files
committed
fix comment
1 parent 4897e8b commit 73cf21f

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

include/gc/Transforms/Passes.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def IterativeTilingAndFusion : Pass<"iterative-tiling-and-fusion",
6060
let description = [{
6161
The pass tries to fuse any MLIR operation which can be tiled. Moreover, this pass aims to support:
6262
1. Matmul fusion with element-wise/reduce/broadcast ops.
63-
2. Pre-op and post-op fusion.
64-
3. Multi-consumer and multi-producer support.
65-
4. Multiple level of nest loops and candidates.
63+
2. Producer and consumer fusion.
64+
3. Arbitrary topology, including residual pattern with multiple consumers .
65+
4. Nest loops structure with multiple level candidates.
6666
5. Flexible option to control the boundary of iterative process.
6767
6. Default tiling when no op is tiled before fusion.
6868
7. Cost-model to determine whether to fuse or not.
@@ -74,9 +74,9 @@ def IterativeTilingAndFusion : Pass<"iterative-tiling-and-fusion",
7474
Option<"useCostModel", "use-cost-model", "bool",
7575
/*default=*/"false",
7676
"Decide if enable cost model to control iterative fusion.">,
77-
Option<"defaultNDTile", "default-nd-tile", "int",
77+
Option<"defaultNDTile", "default-nd-tile", "unsigned",
7878
/*default=*/"2",
79-
"Set default ND-Tile size, such as 2[default] or 3.">,
79+
"Set default ND-Tile size, such as 1, 2[default], etc.">,
8080
ListOption<"defaultTileSize", "default-tile-size", "std::string",
8181
"Set default TileSize for the certain type of op, saying `matmul:{32,32}`.">,
8282
];

lib/gc/Transforms/IterativeTilingAndFusion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ struct defaultTileConfig {
652652
// OpTy-to-TileSize mapping
653653
OpTileSizeMap tsMap;
654654
// ND-tile size
655-
int ndTile;
655+
unsigned ndTile;
656656
};
657657

658658
/// Default Tiling function only effective for certain `OpTy` operation
@@ -690,7 +690,7 @@ defaultTilingOfType(RewriterBase &rewriter, Operation *op,
690690
SmallVector<int64_t> tsOrder = {32, 16};
691691
// Record how many dims have been tiled, including fully tiled, i.e.
692692
// tileSize == dimSize.
693-
int nonOneTileDims =
693+
unsigned nonOneTileDims =
694694
(isa<mlir::linalg::LinalgOp>(op) && !linalgx::isMatmulOp(op))
695695
? cast<mlir::linalg::LinalgOp>(op).getNumReductionLoops()
696696
: 0;

test/mlir/test/gc/Transforms/iterative-tiling-and-fusion.mlir

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ module {
366366
/// CHECK: linalg.add
367367
%add = linalg.add ins(%arg0, %arg1 : tensor<1x32x4096xbf16>, tensor<1x32x4096xbf16>) outs(%dest0 : tensor<1x32x4096xbf16>) -> tensor<1x32x4096xbf16>
368368
%dest1 = tensor.empty() : tensor<1x1x128x32x32xbf16>
369-
/// CHECK: tensor.pack
369+
/// CHECK-NEXT: affine.apply
370+
/// CHECK-NEXT: tensor.extract_slice
371+
/// CHECK-NEXT: tensor.pack
370372
%pack = tensor.pack %add outer_dims_perm = [0, 1, 2] inner_dims_pos = [1, 2] inner_tiles = [32, 32] into %dest1 : tensor<1x32x4096xbf16> -> tensor<1x1x128x32x32xbf16>
371373
/// CHECK: scf.forall.in_parallel
372374
/// CHECK: tensor.parallel_insert_slice

0 commit comments

Comments
 (0)