Skip to content

Commit 562b5c7

Browse files
committed
save work
1 parent f64581a commit 562b5c7

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ def XeGPUSubgroupDistribute : Pass<"xegpu-subgroup-distribute"> {
3131
let dependentDialects = [
3232
"memref::MemRefDialect", "xegpu::XeGPUDialect", "vector::VectorDialect"
3333
];
34+
let options = [
35+
Option<"printOnly", "print-analysis-only", "bool",
36+
/*default=*/"false",
37+
"Print the result of the subgroup map propagation analysis and exit.">
38+
];
3439
}
3540

3641
#endif // MLIR_DIALECT_XEGPU_TRANSFORMS_PASSES_TD

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ void SGMapPropagation::visitVectorMultiReductionOp(
355355
/// Given that the result is 1D, the layout of the operand should be 2D with
356356
/// default layout.
357357
auto operandLayout = getDefaultSgMap(2);
358-
operandLayout.print(llvm::outs());
359358
propagateIfChanged(operands[0], operands[0]->meet(operandLayout));
360359
/// Accumulator should have the same layout as the result.
361360
propagateIfChanged(operands[1], operands[1]->meet(resultLayout));
@@ -625,16 +624,11 @@ struct XeGPUSubgroupDistributePass final
625624
: public xegpu::impl::XeGPUSubgroupDistributeBase<
626625
XeGPUSubgroupDistributePass> {
627626
XeGPUSubgroupDistributePass() = default;
628-
XeGPUSubgroupDistributePass(const XeGPUSubgroupDistributePass &other)
629-
: xegpu::impl::XeGPUSubgroupDistributeBase<XeGPUSubgroupDistributePass>(
630-
other) {
631-
this->printOnly = other.printOnly;
632-
}
627+
XeGPUSubgroupDistributePass(const XeGPUSubgroupDistributePass &other) =
628+
default;
629+
XeGPUSubgroupDistributePass(xegpu::XeGPUSubgroupDistributeOptions options)
630+
: XeGPUSubgroupDistributeBase(options) {}
633631
void runOnOperation() override;
634-
/// Print sg map propagation analysis result and exit for testing purposes.
635-
Option<bool> printOnly{*this, "print-analysis-only", llvm::cl::init(false),
636-
llvm::cl::desc("Print the result of the subgroup map "
637-
"propagation analysis and exit.")};
638632
};
639633
} // namespace
640634

0 commit comments

Comments
 (0)