[Mlir-commits] [mlir] [MLIR][XeGPU] Add unroll patterns for XeGPU (1/N) (PR #137010)

Charitha Saumya llvmlistbot at llvm.org
Tue May 6 11:19:42 PDT 2025


================
@@ -38,6 +38,8 @@ def XeGPU_Dialect : Dialect {
     let useDefaultAttributePrinterParser = true;
 
     let extraClassDeclaration = [{
+      static constexpr const char *operandLayoutNamePrefix = "layout_operand_";
+      static constexpr const char *resultLayoutNamePrefix = "layout_result_";
       /// Checks if the given shape can be evenly distributed based on the layout
       /// and data factors provided by the LayoutAttr.
       static bool isEvenlyDistributable(llvm::ArrayRef<int64_t> shape, xegpu::LayoutAttr attr);
----------------
charithaintc wrote:

please move common utilities to XeGPUUtils.h

`isEvenlyDistributable` and operandLayoutNamePrefix can go there I think. 

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


More information about the Mlir-commits mailing list