[Mlir-commits] [mlir] [MLIR][XeGPU] Distribute create_nd_desc op without offset from Wg to Sg (PR #152351)
Jianhui Li
llvmlistbot at llvm.org
Fri Aug 8 09:33:43 PDT 2025
================
@@ -161,6 +161,18 @@ struct WgToSgCreateNdOp : public OpConversionPattern<xegpu::CreateNdDescOp> {
LogicalResult
matchAndRewrite(xegpu::CreateNdDescOp op, OneToNOpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
+
+ // Ensure that the op has explicit offsets specified (either dynamic or
+ // constant).
+ int64_t offsetSize = static_cast<int64_t>(op.getOffsets().size());
+ if (offsetSize == 0) {
+ auto constOffsetsAttr = op.getConstOffsetsAttr();
+ if (!constOffsetsAttr || constOffsetsAttr.empty() ||
+ llvm::all_of(constOffsetsAttr.asArrayRef(),
----------------
Jianhui-Li wrote:
I think we'd better leave create_nd_tdesc as is. and only work on load_nd/store_nd/prefetch_nd but override the offset set by create_nd_tdesc distribution.
https://github.com/llvm/llvm-project/pull/152351
More information about the Mlir-commits
mailing list