[Mlir-commits] [mlir] [mlir][gpu] Make offset and width in gpu.rotate as attributes (PR #150901)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jul 28 01:44:43 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 HEAD~1 HEAD --extensions cpp -- mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp b/mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
index a156fdd3d..18178614e 100644
--- a/mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
+++ b/mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
@@ -514,8 +514,10 @@ LogicalResult GPURotateConversion::matchAndRewrite(
 
   Location loc = rotateOp.getLoc();
   auto scope = rewriter.getAttr<spirv::ScopeAttr>(spirv::Scope::Subgroup);
-  Value offsetVal = arith::ConstantOp::create(rewriter, loc, adaptor.getOffsetAttr());
-  Value widthVal = arith::ConstantOp::create(rewriter, loc, adaptor.getWidthAttr());
+  Value offsetVal =
+      arith::ConstantOp::create(rewriter, loc, adaptor.getOffsetAttr());
+  Value widthVal =
+      arith::ConstantOp::create(rewriter, loc, adaptor.getWidthAttr());
   Value rotateResult = spirv::GroupNonUniformRotateKHROp::create(
       rewriter, loc, scope, adaptor.getValue(), offsetVal, widthVal);
   Value validVal;

``````````

</details>


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


More information about the Mlir-commits mailing list