File tree Expand file tree Collapse file tree 2 files changed +92
-19
lines changed
lib/Dialect/XeGPU/Transforms Expand file tree Collapse file tree 2 files changed +92
-19
lines changed Original file line number Diff line number Diff line change @@ -317,8 +317,7 @@ struct WgToSgPrefetchNdOp : public OpConversionPattern<xegpu::PrefetchNdOp> {
317
317
}
318
318
};
319
319
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
322
321
template <typename Op>
323
322
struct WgToSgElementwiseOp : public OpConversionPattern <Op> {
324
323
using OpConversionPattern<Op>::OpConversionPattern;
@@ -344,7 +343,6 @@ struct WgToSgElementwiseOp : public OpConversionPattern<Op> {
344
343
}
345
344
}
346
345
347
- // Check for layout attribute with sgLayout
348
346
auto layout = dyn_cast_or_null<xegpu::LayoutAttr>(op->getAttr (" layout" ));
349
347
if (!layout || !layout.getSgLayout ())
350
348
return rewriter.notifyMatchFailure (
@@ -364,7 +362,6 @@ struct WgToSgElementwiseOp : public OpConversionPattern<Op> {
364
362
}
365
363
}
366
364
367
- // Each operand is a list of values
368
365
size_t numVariants = adaptor.getOperands ().empty ()
369
366
? 0
370
367
: adaptor.getOperands ().front ().size ();
@@ -586,7 +583,6 @@ void XeGPUWgToSgDistributePass::runOnOperation() {
586
583
}
587
584
}
588
585
589
- // check layout attribute
590
586
auto layout = dyn_cast_or_null<xegpu::LayoutAttr>(
591
587
op->getAttrOfType <xegpu::LayoutAttr>(" layout" ));
592
588
return isLegal (layout);
You can’t perform that action at this time.
0 commit comments