[Mlir-commits] [mlir] 169f055 - [mlir][sparse] fix compiler warning when using release build.
Peiming Liu
llvmlistbot at llvm.org
Tue Nov 22 16:53:55 PST 2022
Author: Peiming Liu
Date: 2022-11-23T00:53:50Z
New Revision: 169f0556530412ed1589ba5f3edeb8665bf16a91
URL: https://github.com/llvm/llvm-project/commit/169f0556530412ed1589ba5f3edeb8665bf16a91
DIFF: https://github.com/llvm/llvm-project/commit/169f0556530412ed1589ba5f3edeb8665bf16a91.diff
LOG: [mlir][sparse] fix compiler warning when using release build.
Differential Revision: https://reviews.llvm.org/D138533
Added:
Modified:
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
index 1367baaa02b5..94ac0ccecab3 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
@@ -181,8 +181,7 @@ static bool isInvariantAffine(const CodeGen &codegen, AffineExpr a,
/// that adheres to the given topological sort.
static AffineMap permute(const Merger &merger, MLIRContext *context,
AffineMap m, ArrayRef<unsigned> topSort) {
- unsigned sz = topSort.size();
- assert(m.getNumDims() + merger.getNumFilterLoops() == sz &&
+ assert(m.getNumDims() + merger.getNumFilterLoops() == topSort.size() &&
"TopoSort/AffineMap size mismatch");
// Construct the inverse of `m`; to avoid the asymptotic complexity
// of calling `m.getPermutedPosition` repeatedly.
More information about the Mlir-commits
mailing list