[Mlir-commits] [mlir] [MLIR][XeGPU] Add uArch defintion for CRI - Crescent Island (PR #191024)

Sang Ik Lee llvmlistbot at llvm.org
Wed Apr 8 13:12:08 PDT 2026


https://github.com/silee2 updated https://github.com/llvm/llvm-project/pull/191024

>From dd99446a4eecb1f077354c37c05627aac2801c70 Mon Sep 17 00:00:00 2001
From: "Lee, Sang Ik" <sang.ik.lee at intel.com>
Date: Wed, 8 Apr 2026 18:07:37 +0000
Subject: [PATCH 1/2] [MLIR][XeGPU] Add uArch defintion for CRI - Crescent
 Island XeGPU lowering relies on uArch definition and lowering fails if a chip
 does not have uArch definition entry. Add preliminary uArch definition for
 CRI. This is a place holder for now and current defintion is identical to
 BMG.

---
 .../mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h    | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h b/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h
index b36c6e3fee353..e5b38a644dd4c 100644
--- a/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h
+++ b/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h
@@ -279,11 +279,41 @@ struct BMGuArch : public Xe2Plus {
   }
 };
 
+struct CRIuArch : public Xe2Plus {
+  static llvm::ArrayRef<const Instruction *> getInstructionRegistryArr() {
+    static const SubgroupMatrixMultiplyAcc dpasInst{16, 32};
+    static const Subgroup2DBlockLoadInstruction loadNdInst;
+    static const Subgroup2DBlockStoreInstruction storeNdInst;
+    static const Subgroup2DBlockPrefetchInstruction prefetchNdInst;
+    static const SpirvStoreScatterInstruction storeScatterInst;
+    static const SpirvLoadGatherInstruction loadGatherInst;
+    static const Instruction *arr[] = {&dpasInst,         &loadNdInst,
+                                       &storeNdInst,      &prefetchNdInst,
+                                       &storeScatterInst, &loadGatherInst};
+    return arr;
+  }
+
+  CRIuArch()
+      : Xe2Plus("cri",                     // archName
+                "Crescent Island Architecture", // archDescription
+                getInstructionRegistryArr(),
+                // Using bmg config as placeholder
+                // TODO: Update to actual XeCore and SharedMemory config
+                XeCoreInfo(8, SharedMemory(256 * 1024, 4), 8, 8) // xeCore
+        ) {}
+  static const uArch *getInstance() {
+    static const CRIuArch instance;
+    return reinterpret_cast<const uArch *>(&instance);
+  }
+};
+
 inline const uArch *getUArch(llvm::StringRef archName) {
   if (archName.equals_insensitive("pvc"))
     return PVCuArch::getInstance();
   if (archName.equals_insensitive("bmg"))
     return BMGuArch::getInstance();
+  if (archName.equals_insensitive("cri"))
+    return CRIuArch::getInstance();
   return nullptr;
 }
 

>From e3acfb0169d0665dce7a1fd527f050db91ae8b84 Mon Sep 17 00:00:00 2001
From: "Lee, Sang Ik" <sang.ik.lee at intel.com>
Date: Wed, 8 Apr 2026 20:11:44 +0000
Subject: [PATCH 2/2] Clang format.

---
 mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h b/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h
index e5b38a644dd4c..595965d414840 100644
--- a/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h
+++ b/mlir/include/mlir/Dialect/XeGPU/uArch/IntelGpuXe2.h
@@ -294,7 +294,7 @@ struct CRIuArch : public Xe2Plus {
   }
 
   CRIuArch()
-      : Xe2Plus("cri",                     // archName
+      : Xe2Plus("cri",                          // archName
                 "Crescent Island Architecture", // archDescription
                 getInstructionRegistryArr(),
                 // Using bmg config as placeholder



More information about the Mlir-commits mailing list