[Mlir-commits] [mlir] e898be2 - [mlir] Fix warnings
Kazu Hirata
llvmlistbot at llvm.org
Fri Sep 30 15:01:05 PDT 2022
Author: Kazu Hirata
Date: 2022-09-30T15:00:56-07:00
New Revision: e898be2f6edbb886af2f6b23e2f5db5210535620
URL: https://github.com/llvm/llvm-project/commit/e898be2f6edbb886af2f6b23e2f5db5210535620
DIFF: https://github.com/llvm/llvm-project/commit/e898be2f6edbb886af2f6b23e2f5db5210535620.diff
LOG: [mlir] Fix warnings
This patch fixes:
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1348:31: error: comparison
of integers of different signs: 'size_t' (aka 'unsigned long') and
'int64_t' (aka 'long') [-Werror,-Wsign-compare]
mlir/lib/ExecutionEngine/SparseTensor/File.cpp:110:3: error: default
label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
Added:
Modified:
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/lib/ExecutionEngine/SparseTensor/File.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index 256e61ee03547..7014864fc57e8 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -1345,7 +1345,7 @@ LogicalResult ReduceOp::verify() {
reducedInputDims.push_back(en.value());
}
- if (reducedInputDims.size() != initType.getRank()) {
+ if (reducedInputDims.size() != static_cast<size_t>(initType.getRank())) {
return emitOpError() << "number of dimensions after reduction "
<< reducedInputDims.size()
<< " doesn't match the init rank "
diff --git a/mlir/lib/ExecutionEngine/SparseTensor/File.cpp b/mlir/lib/ExecutionEngine/SparseTensor/File.cpp
index 3e8c3e0821441..eac3b0278ce39 100644
--- a/mlir/lib/ExecutionEngine/SparseTensor/File.cpp
+++ b/mlir/lib/ExecutionEngine/SparseTensor/File.cpp
@@ -107,9 +107,6 @@ bool SparseTensorFile::canReadAs(PrimaryType valTy) const {
// So we allow implicitly converting the stored values to both
// integer and floating primary-types.
return isRealPrimaryType(valTy);
- default:
- MLIR_SPARSETENSOR_FATAL("Unknown ValueKind: %d\n",
- static_cast<uint8_t>(valueKind_));
}
}
More information about the Mlir-commits
mailing list