[Mlir-commits] [mlir] [MLIR][XeGPU] Support order attribute and add pattern for vector.transpose in WgToSg Pass (PR #165307)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Oct 27 12:55:57 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
index e59d295e3..f7cb1e6a4 100644
--- a/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
+++ b/mlir/lib/Dialect/XeGPU/IR/XeGPUDialect.cpp
@@ -302,21 +302,21 @@ LayoutAttr::delinearizeSubgroupId(OpBuilder &builder, Location loc,
   /// The first dimension in order is the fastest-changing
   ///
   /// Example walkthrough for linearId=22, sgLayout=[2,4,4], order=[2,1,0]:
-  /// 
+  ///
   /// Initial: remaining=22, result=[?,?,?]
-  /// 
+  ///
   /// i=0 (process columns, dimIdx=2, dimSize=4):
   ///   result[2] = 22 % 4 = 2  (column coordinate)
   ///   remaining = 22 / 4 = 5  (5 complete groups of 4 columns processed)
-  /// 
+  ///
   /// i=1 (process rows, dimIdx=1, dimSize=4):
-  ///   result[1] = 5 % 4 = 1   (row coordinate) 
+  ///   result[1] = 5 % 4 = 1   (row coordinate)
   ///   remaining = 5 / 4 = 1   (1 complete group of 4 rows processed)
-  /// 
+  ///
   /// i=2 (process layers, dimIdx=0, dimSize=2):
   ///   result[0] = 1 % 2 = 1   (layer coordinate)
   ///   (no remaining update - last iteration)
-  /// 
+  ///
   /// Final result: [1,1,2] = Layer 1, Row 1, Column 2
   for (size_t i = 0; i < order.size(); ++i) {
     int64_t dimIdx = order[i];
@@ -327,8 +327,8 @@ LayoutAttr::delinearizeSubgroupId(OpBuilder &builder, Location loc,
 
     /// Extract the coordinate for this dimension using modulo operation
     /// This gives us "how far within this dimension" we are
-    /// e.g., linearId=22, dimSize=4: 22 % 4 = 2 (we're at position 2 within this
-    /// dimension)
+    /// e.g., linearId=22, dimSize=4: 22 % 4 = 2 (we're at position 2 within
+    /// this dimension)
     result[dimIdx] =
         builder.createOrFold<index::RemUOp>(loc, remaining, dimSizeVal);
 

``````````

</details>


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


More information about the Mlir-commits mailing list