We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd4f9fc commit 4612f64Copy full SHA for 4612f64
mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp
@@ -155,7 +155,7 @@ struct WgToSgCreateNdOp : public OpConversionPattern<xegpu::CreateNdDescOp> {
155
SmallVector<int64_t> distUnitShape(sgLayout.size());
156
SmallVector<Value> localOffset(sgLayout.size());
157
for (size_t i = 0; i < sgLayout.size(); i++) {
158
- distUnitShape[i] = sgLayout[i] * sgShape[i];
+ distUnitShape[i] = std::min(sgLayout[i] * sgShape[i], wgShape[i]);
159
localOffset[i] =
160
rewriter.createOrFold<index::MulOp>(loc, sgIds[i], sgDataDim[i]);
161
}
0 commit comments