[Mlir-commits] [mlir] [mlir][vector] Clarify the semantics of BroadcastOp (PR #101928)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Aug 6 02:49:03 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 0dcada94bb1ae79f0edd91013038098c62a96b3b 587f08e445f68a8311c2c5bdaa967d80fea34211 --extensions cpp,h -- mlir/include/mlir/Dialect/Vector/IR/VectorOps.h mlir/lib/Dialect/Vector/IR/VectorOps.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index b8e2fc0b64..e9e708fbba 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -2430,15 +2430,14 @@ LogicalResult BroadcastOp::verify() {
if (res == BroadcastableToResult::SourceRankHigher)
return emitOpError("source rank higher than destination rank");
if (res == BroadcastableToResult::DimensionMismatch) {
- std::string msg =
- (Twine("dimension mismatch (") +
- (mismatchingDims.first.isScalable ? "[" : "") +
- std::to_string(mismatchingDims.first.dim) +
- (mismatchingDims.first.isScalable ? "]" : "") + " vs. " +
- (mismatchingDims.second.isScalable ? "[" : "") +
- std::to_string(mismatchingDims.second.dim) +
- (mismatchingDims.second.isScalable ? "]" : "") + ")")
- .str();
+ std::string msg = (Twine("dimension mismatch (") +
+ (mismatchingDims.first.isScalable ? "[" : "") +
+ std::to_string(mismatchingDims.first.dim) +
+ (mismatchingDims.first.isScalable ? "]" : "") + " vs. " +
+ (mismatchingDims.second.isScalable ? "[" : "") +
+ std::to_string(mismatchingDims.second.dim) +
+ (mismatchingDims.second.isScalable ? "]" : "") + ")")
+ .str();
return emitOpError(msg);
}
if (res == BroadcastableToResult::SourceTypeNotAVector)
``````````
</details>
https://github.com/llvm/llvm-project/pull/101928
More information about the Mlir-commits
mailing list