[Mlir-commits] [mlir] [mlir][spirv] Split codegen for float min/max reductions and others v2. [NFC] (PR #73363)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Nov 24 12:08:41 PST 2023


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 4233176f9bf8d0309c03b127aa113ae826718dfa c283ffc7c54efecd2520c057b9871f65780f1caf -- mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp b/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
index 29bc5f1dd7..6943ae9169 100644
--- a/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
+++ b/mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
@@ -353,10 +353,9 @@ struct VectorInsertStridedSliceOpConvert final
   }
 };
 
-static SmallVector<Value> extractAllElements(vector::ReductionOp reduceOp,
-                                      vector::ReductionOp::Adaptor adaptor,
-                                      VectorType srcVectorType,
-                                      ConversionPatternRewriter &rewriter) {
+static SmallVector<Value> extractAllElements(
+    vector::ReductionOp reduceOp, vector::ReductionOp::Adaptor adaptor,
+    VectorType srcVectorType, ConversionPatternRewriter &rewriter) {
   int numElements = srcVectorType.getDimSize(0);
   SmallVector<Value> values;
   values.reserve(numElements + (adaptor.getAcc() != nullptr));
@@ -452,7 +451,8 @@ struct VectorReductionPattern final : OpConversionPattern<vector::ReductionOp> {
 };
 
 template <typename SPIRVFMaxOp, typename SPIRVFMinOp>
-struct VectorReductionFloatMinMax final : OpConversionPattern<vector::ReductionOp> {
+struct VectorReductionFloatMinMax final
+    : OpConversionPattern<vector::ReductionOp> {
   using OpConversionPattern::OpConversionPattern;
 
   LogicalResult

``````````

</details>


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


More information about the Mlir-commits mailing list