[mlir][sparse] fix compiler warning in release build.

Differential Revision: https://reviews.llvm.org/D149607
This commit is contained in:
Peiming Liu
2023-05-01 18:58:22 +00:00
parent 9809eb32a4
commit 4ca1932776

View File

@@ -1609,6 +1609,7 @@ struct SparseUnpackOpConverter : public OpConversionPattern<UnpackOp> {
const unsigned nBatched = op.getNumBatchedLvls();
assert(isCOOType(srcTp.getEncoding(), nBatched, true) &&
desc.getFields().size() == 4); // specifier + pos + crds + values
(void)srcTp;
auto logicRes = nBatched == 0
? genUnBatchedUnpackOp(op, desc, rewriter)
: genBatchedUnpackOp(op, nBatched, desc, rewriter);