From 169f0556530412ed1589ba5f3edeb8665bf16a91 Mon Sep 17 00:00:00 2001 From: Peiming Liu Date: Wed, 23 Nov 2022 00:43:10 +0000 Subject: [PATCH] [mlir][sparse] fix compiler warning when using release build. Differential Revision: https://reviews.llvm.org/D138533 --- mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp index 1367baa..94ac0cc 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 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. -- 2.7.4