Skip to content

Commit c6695d9

Browse files
committed
add comments
1 parent bbf4796 commit c6695d9

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

mlir/include/mlir/Dialect/XeGPU/Transforms/Passes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def XeGPUSubgroupDistribute : Pass<"xegpu-subgroup-distribute"> {
3939
}
4040

4141
def XeGPUBlocking: Pass<"xegpu-blocking"> {
42-
let summary = "Instructionlize XeGPU ops";
42+
let summary = "Block XeGPU ops into smaller size.";
4343
let description = [{
4444
The pass unrolls XeGPU ops working on large shapes into ops working on small shapes
4545
(given by the inst_data in the layout attr), such that each of them can be dispatch

mlir/include/mlir/Dialect/XeGPU/Utils/XeGPUUtils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ Value createVectorWithShapeFromValues(OpBuilder &builder, Location loc,
103103
/// first converted into RankedTensorType, where the layout attribute can be
104104
/// attached. And then upstream SCF structural type conversion patterns are
105105
/// applied with the provided converter.
106+
/// TODO: This is a temporary solution. We should refactor it when context-aware
107+
/// type conversion is available.
106108
void doSCFStructuralTypeConversionWithTensorType(Operation *op,
107109
TypeConverter converter);
108110

mlir/lib/Dialect/XeGPU/Transforms/XeGPUBlocking.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ using namespace mlir;
3333

3434
namespace {
3535

36-
void resolveUnrealizedConversionCastOp(UnrealizedConversionCastOp castOp) {
36+
// reslove the unrealized conversion cast ops generated when doing SCF
37+
// Structural Type Conversion. It will have two formats, N:1 vector
38+
// cast and 1:N vector cast. vector::insert_strided_slice ops will be
39+
// used for the first case, and vector::extract_strided_slice ops will be
40+
// used for the second case.
41+
static void resolveUnrealizedConversionCastOp(UnrealizedConversionCastOp castOp) {
3742
ValueRange inputs = castOp.getInputs();
3843
ValueRange outputs = castOp.getOutputs();
3944

0 commit comments

Comments
 (0)