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> {
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
322321template <typename Op>
323322struct 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);
You can’t perform that action at this time.
0 commit comments