[Mlir-commits] [mlir] [MLIR][XeGPU] Enable peephole optimization for the CRI target (PR #201655)

Artem Kroviakov llvmlistbot at llvm.org
Mon Jun 8 03:50:06 PDT 2026


================
@@ -253,11 +261,17 @@ class XeGPUCreateNdDescOpPattern final
   matchAndRewrite(xegpu::CreateNdDescOp createNdOp, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
     auto tdescTy = createNdOp.getType();
+    // sub-byte type is not supported for now.
+    if (tdescTy.getElementTypeBitWidth() < 8)
+      return failure();
     // Get the target uArch info.
     auto chipStr = xegpu::getChipStr(createNdOp);
     // Check if the chip is supported.
-    assert(chipStr && (chipStr.value() == "pvc" || chipStr.value() == "bmg") &&
-           "Expecting target chip to be pvc, bmg for transpose optimization.");
+    assert(chipStr &&
----------------
akroviakov wrote:

Perhaps query the applicability from the corresponding uArch member/interface? Can be addressed in a future PR.

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


More information about the Mlir-commits mailing list