[Mlir-commits] [mlir] [MLIR][XeGPU] Validate DPAS operand types against uArch in XeGPUToXeVM conversion (PR #185081)
Arjun Bhamra
llvmlistbot at llvm.org
Wed Mar 11 18:01:52 PDT 2026
================
@@ -902,6 +903,43 @@ class DpasToXeVMPattern : public OpConversionPattern<xegpu::DpasOp> {
auto bTy = cast<VectorType>(op.getRhs().getType());
auto resultType = cast<VectorType>(op.getResultType());
+ // get the correct dpasInst by getting info from chip
+ auto chipStr = xegpu::getChipStr(op);
+ if (!chipStr)
+ return rewriter.notifyMatchFailure(op, "cannot determine target chip");
+
+ const auto *uArch = mlir::xegpu::uArch::getUArch(*chipStr);
+ if (!uArch)
+ return rewriter.notifyMatchFailure(op, "unsupported target uArch");
+
+ auto *dpasInst = const_cast<xegpu::uArch::SubgroupMatrixMultiplyAcc *>(
----------------
abhamra wrote:
I believe so, because currently `getSupportedTypes` is not a const function right now, and we need that. However, that seems like a reasonable change. What do you think?
https://github.com/llvm/llvm-project/pull/185081
More information about the Mlir-commits
mailing list