We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bddf85 commit 2077fb8Copy full SHA for 2077fb8
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
@@ -1160,9 +1160,8 @@ bool mlir::sparse_tensor::isBlockSparsity(AffineMap dimToLvl) {
1160
} else if (auto dimOp = dyn_cast<AffineDimExpr>(result)) {
1161
auto pos = dimOp.getPosition();
1162
// Expect dim to be unset.
1163
- if (coeffientMap.find(pos) != coeffientMap.end())
+ if (!coeffientMap.try_emplace(pos, 0).second)
1164
return false;
1165
- coeffientMap[pos] = 0;
1166
} else {
1167
1168
}
0 commit comments