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 9ece051 commit 3b13f88Copy full SHA for 3b13f88
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
@@ -885,7 +885,7 @@ class SparseTensorEnumerator final : public SparseTensorEnumeratorBase<V> {
885
const uint64_t pstop = static_cast<uint64_t>(pointers_d[parentPos + 1]);
886
// Loop-invariant code for looking up the `d`-level coordinates/indices.
887
const std::vector<I> &indices_d = src.indices[d];
888
- assert(pstop - 1 < indices_d.size() && "Index position is out of bounds");
+ assert(pstop <= indices_d.size() && "Index position is out of bounds");
889
uint64_t &cursor_reord_d = this->cursor[this->reord[d]];
890
for (uint64_t pos = pstart; pos < pstop; pos++) {
891
cursor_reord_d = static_cast<uint64_t>(indices_d[pos]);
0 commit comments