[Mlir-commits] [mlir] [MLIR][XeGPU] Extend SGMapAttr and Add ConvertLayoutOp (PR #132425)

Charitha Saumya llvmlistbot at llvm.org
Thu Mar 27 11:13:06 PDT 2025


================
@@ -979,4 +983,24 @@ def XeGPU_FenceOp: XeGPU_Op<"fence", []> {
   let extraClassDeclaration = extraBaseClassDeclaration;
 }
 
+def XeGPU_ConvertLayoutOp: XeGPU_Op<"convert_layout", [Pure, AllTypesMatch<["source", "result"]>]> {
+    let summary = "Convert the layout of the input operand";
+    let description = [{
+      `convert_layout` adjusts the data distribution across subgroups and/or work-items by modifying
+      the `LayoutAttr`. Both `srcMap` and `resMap` must correspond to the same programming scope, such
+      as workgroup-level (wg) or subgroup-level (sg) code. This operation is not supported for
+      work-item-level code.
----------------
charithaintc wrote:

reword to "This operation is not valid once the IR is lowered to WI level because that is the end result of all distributions"

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


More information about the Mlir-commits mailing list