[Mlir-commits] [mlir] [mlir][XeGPU][XeGPUUnroll] Support new syntax with offsets moved to load_nd/store_nd/prefetch_nd (PR #160323)
Dmitry Chigarev
llvmlistbot at llvm.org
Wed Sep 24 04:11:43 PDT 2025
================
@@ -247,22 +292,39 @@ struct UnrollLoadNdOp : public UnrollPattern<xegpu::LoadNdOp> {
return failure();
int64_t offsetSize = static_cast<int64_t>(op.getOffsets().size());
- if ((offsetSize != 0) || op.getConstOffsetsAttr())
- return failure();
+ bool hasOffsets = (offsetSize != 0) || op.getConstOffsetsAttr();
Type elemTy = tdescTy.getElementType();
VectorType newValueTy = valueTy.cloneWith(*targetShape, elemTy);
SmallVector<Type> convertedTdescTypes =
getUnrolledTypes(tdescTy, *targetShape);
+
+ if (hasOffsets) {
+ // only need one tdesc, tile offsets will be computed
+ // at the operation level
+ convertedTdescTypes.resize(1);
----------------
dchigarev wrote:
done
https://github.com/llvm/llvm-project/pull/160323
More information about the Mlir-commits
mailing list