[Mlir-commits] [mlir] [MLIR][XeGPU] Unroll Dpasmx Op (PR #195179)

Jianhui Li llvmlistbot at llvm.org
Tue May 5 15:46:57 PDT 2026


================
@@ -410,6 +410,111 @@ struct UnrollDpasOp : public UnrollPattern<xegpu::DpasOp> {
   }
 };
 
+struct UnrollDpasMxOp : public UnrollPattern<xegpu::DpasMxOp> {
+  using UnrollPattern<xegpu::DpasMxOp>::UnrollPattern;
+  LogicalResult matchAndRewrite(xegpu::DpasMxOp op,
+                                PatternRewriter &rewriter) const override {
+    Location loc = op.getLoc();
+    if (llvm::any_of(op->getOperandTypes(), [&](Type type) {
+          auto vecTy = dyn_cast<VectorType>(type);
+          return !vecTy || vecTy.getRank() != 2;
+        }))
+      return failure();
----------------
Jianhui-Li wrote:

I removed the checker here and refactor the op verifier for both dpas and dpasmx. 
For lane-level, we can't decide using empty anchor set since the wg level code may not have anchor also.  The code right determines the lane-level semantics if vector rank is 1.

https://github.com/llvm/llvm-project/pull/195179


More information about the Mlir-commits mailing list