[Mlir-commits] [mlir] a8d9378 - [mlir] Fix a warning
Kazu Hirata
llvmlistbot at llvm.org
Sun Nov 6 00:52:48 PDT 2022
Author: Kazu Hirata
Date: 2022-11-06T00:52:42-07:00
New Revision: a8d93783f37c042ace67069ae4ca6f8fd849c2d0
URL: https://github.com/llvm/llvm-project/commit/a8d93783f37c042ace67069ae4ca6f8fd849c2d0
DIFF: https://github.com/llvm/llvm-project/commit/a8d93783f37c042ace67069ae4ca6f8fd849c2d0.diff
LOG: [mlir] Fix a warning
This patch fixes:
llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1855:17:
error: comparison of integers of different signs: 'int64_t' (aka
'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
Added:
Modified:
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index 6377a68bc3c5..3069ddce0f5b 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -1852,7 +1852,7 @@ LogicalResult BroadcastOp::verify() {
auto inputShape = inputType.getShape();
auto initShape = initType.getShape();
- if (inputRank != dimensionsRef.size())
+ if ((size_t)inputRank != dimensionsRef.size())
return emitOpError()
<< "input rank does match the number of dimensions. expected: "
<< inputRank << ", got: " << dimensionsRef.size();
More information about the Mlir-commits
mailing list