@@ -59,7 +59,7 @@ getSgShapeAndCount(ArrayRef<int64_t> shape,
5959 xegpu::DistributeLayoutAttrInterface layout) {
6060 int count = 1 ;
6161 SmallVector<int64_t > sgShape (shape);
62- if (layout && layout.isWgLayout ()) {
62+ if (layout && layout.isForWorkgroup ()) {
6363 SmallVector<int64_t > sgLayout = layout.getSgLayoutAsInt ().value ();
6464 if (auto maybeSgData = layout.getSgDataAsInt ())
6565 sgShape = *maybeSgData;
@@ -115,7 +115,7 @@ genOffsetsList(ConversionPatternRewriter &rewriter, OpType op,
115115
116116 // not applicable to ops without workgroup layout attributes
117117 xegpu::DistributeLayoutAttrInterface layout = op.getLayoutAttr ();
118- if (!layout || !layout.isWgLayout ())
118+ if (!layout || !layout.isForWorkgroup ())
119119 return failure ();
120120
121121 Value sgId = rewriter.create <gpu::SubgroupIdOp>(loc, /* upper_bound=*/ nullptr );
@@ -249,7 +249,7 @@ struct WgToSgCreateNdOpNoOffset
249249 MLIRContext *ctx = op.getContext ();
250250 xegpu::TensorDescType tdescTy = op.getType ();
251251 auto layout = dyn_cast<xegpu::LayoutAttr>(tdescTy.getLayout ());
252- if (!layout || !layout.isWgLayout ())
252+ if (!layout || !layout.isForWorkgroup ())
253253 return failure ();
254254
255255 Type elemTy = tdescTy.getElementType ();
@@ -637,7 +637,8 @@ struct WgToSgConvertLayoutOp
637637 xegpu::LayoutAttr input = op.getInputLayout ();
638638 xegpu::LayoutAttr target = op.getTargetLayout ();
639639
640- if (!input || !target || !input.isWgLayout () || !target.isWgLayout ())
640+ if (!input || !target || !input.isForWorkgroup () ||
641+ !target.isForWorkgroup ())
641642 return rewriter.notifyMatchFailure (
642643 op, " Input and target layouts must have subgroup layout" );
643644
@@ -938,7 +939,7 @@ void XeGPUWgToSgDistributePass::runOnOperation() {
938939 };
939940
940941 auto isLegal = [&](xegpu::DistributeLayoutAttrInterface layout) -> bool {
941- return !layout || !layout.isWgLayout ();
942+ return !layout || !layout.isForWorkgroup ();
942943 };
943944
944945 target.addDynamicallyLegalOp <xegpu::CreateNdDescOp, xegpu::LoadNdOp,
0 commit comments