[Mlir-commits] [mlir] [mlir][vector] Add convenience types for scalable vectors (PR #87986)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Apr 8 08:17:39 PDT 2024


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 40327a628ace90870c7caa0db448a0f2d9863df0 796ebb38bb24be42921fcd30b913539b2f102b63 -- mlir/include/mlir/IR/VectorTypes.h mlir/lib/IR/VectorTypes.cpp mlir/lib/Dialect/Arith/IR/ArithOps.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
index 6f6c972887..07cd7d6f56 100644
--- a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
+++ b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
@@ -18,10 +18,10 @@
 #include "mlir/IR/BuiltinAttributeInterfaces.h"
 #include "mlir/IR/BuiltinAttributes.h"
 #include "mlir/IR/Matchers.h"
-#include "mlir/IR/VectorTypes.h"
 #include "mlir/IR/OpImplementation.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/IR/TypeUtilities.h"
+#include "mlir/IR/VectorTypes.h"
 #include "mlir/Support/LogicalResult.h"
 
 #include "llvm/ADT/APFloat.h"
@@ -218,7 +218,8 @@ LogicalResult arith::ConstantOp::verify() {
   // Note, we could relax this for vectors with 1 scalable dim, e.g.:
   //  * arith.constant dense<[[3, 3], [1, 1]]> : vector<2 x [2] x i32>
   // However, this would most likely require updating the lowerings to LLVM.
-  if (llvm::isa<vector::ScalableVectorType>(type) && !isa<SplatElementsAttr>(getValue()))
+  if (llvm::isa<vector::ScalableVectorType>(type) &&
+      !isa<SplatElementsAttr>(getValue()))
     return emitOpError(
         "intializing scalable vectors with elements attribute is not supported"
         " unless it's a vector splat");

``````````

</details>


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


More information about the Mlir-commits mailing list