Skip to content

Commit e215e22

Browse files
committed
Clean up
1 parent 08f7eb9 commit e215e22

File tree

2 files changed

+92
-19
lines changed

2 files changed

+92
-19
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ struct WgToSgPrefetchNdOp : public OpConversionPattern<xegpu::PrefetchNdOp> {
317317
}
318318
};
319319

320-
// This pattern matches elementwise ops (unary/binary) in math/arith dialects
321-
// with 1D or 2D vector types
320+
// This pattern transforms elementwise ops (unary/binary) in math/arith dialect
322321
template <typename Op>
323322
struct WgToSgElementwiseOp : public OpConversionPattern<Op> {
324323
using OpConversionPattern<Op>::OpConversionPattern;
@@ -344,7 +343,6 @@ struct WgToSgElementwiseOp : public OpConversionPattern<Op> {
344343
}
345344
}
346345

347-
// Check for layout attribute with sgLayout
348346
auto layout = dyn_cast_or_null<xegpu::LayoutAttr>(op->getAttr("layout"));
349347
if (!layout || !layout.getSgLayout())
350348
return rewriter.notifyMatchFailure(
@@ -364,7 +362,6 @@ struct WgToSgElementwiseOp : public OpConversionPattern<Op> {
364362
}
365363
}
366364

367-
// Each operand is a list of values
368365
size_t numVariants = adaptor.getOperands().empty()
369366
? 0
370367
: adaptor.getOperands().front().size();
@@ -586,7 +583,6 @@ void XeGPUWgToSgDistributePass::runOnOperation() {
586583
}
587584
}
588585

589-
// check layout attribute
590586
auto layout = dyn_cast_or_null<xegpu::LayoutAttr>(
591587
op->getAttrOfType<xegpu::LayoutAttr>("layout"));
592588
return isLegal(layout);

0 commit comments

Comments
 (0)