[Mlir-commits] [mlir] a39adc0 - [mlir] Fix warnings in release builds
Kazu Hirata
llvmlistbot at llvm.org
Wed Jun 14 14:22:22 PDT 2023
Author: Kazu Hirata
Date: 2023-06-14T14:22:17-07:00
New Revision: a39adc00dba678bfab76fc0be4ef32c275e7bb59
URL: https://github.com/llvm/llvm-project/commit/a39adc00dba678bfab76fc0be4ef32c275e7bb59
DIFF: https://github.com/llvm/llvm-project/commit/a39adc00dba678bfab76fc0be4ef32c275e7bb59.diff
LOG: [mlir] Fix warnings in release builds
This patch fixes:
mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp:846:16:
error: unused variable 'lvlTp' [-Werror,-Wunused-variable]
mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp:1059:13:
error: unused variable '[t, l]' [-Werror,-Wunused-variable]
Added:
Modified:
mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
index 0a70cb0a970fc..e3abe100a46d4 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
@@ -849,6 +849,7 @@ std::pair<Operation *, Value> LoopEmitter::emitWhileLoopOverTensorsAtLvls(
// Must be a recognizable sparse level.
assert(isCompressedDLT(lvlTp) || isCompressedWithHiDLT(lvlTp) ||
isSingletonDLT(lvlTp));
+ (void)lvlTp;
unsigned prevSz = ivs.size();
const auto reassoc = getCollapseReassociation(tid, lvl);
@@ -1054,12 +1055,14 @@ Operation *LoopEmitter::enterCoIterationOverTensorsAtLvls(
OpBuilder &builder, Location loc, ArrayRef<TensorLevel> tidLvls,
MutableArrayRef<Value> reduc, bool tryParallel, bool genDedup,
bool needsUniv) {
+#ifndef NDEBUG
// Sanity checks.
assert(!tidLvls.empty());
for (auto [t, l] : unpackTensorLevelRange(tidLvls)) {
assert(!coords[t][l] || // We cannot re-enter the same level
!dependentLvlMap[t][l].empty()); // unless it is a slice-driver loop
}
+#endif
// TODO: support multiple return on parallel for?
tryParallel = tryParallel && reduc.size() <= 1;
More information about the Mlir-commits
mailing list