[https://nvbugs/5813452][fix] Fix "Assertion failed: isLeaf() in kvCacheManager.cpp:465" (#10922)

Signed-off-by: Yi Sun <yisun0618@gmail.com>
This commit is contained in:
Yi Sun 2026-01-29 14:38:11 +08:00 committed by GitHub
parent 91528365a9
commit f6dab8388d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1636,6 +1636,11 @@ std::pair<SizeType32, std::vector<KVCacheBlock::IdType>> WindowBlockManager::sto
TLLM_CHECK_WITH_INFO(block->getBlockId() == bid,
"Block id mismatch " + std::to_string(block->getBlockId()) + " != " + std::to_string(bid));
needMatch = false; // no matching needed for following blocks
if (block->getPrevBlock() != nullptr)
{
block->getPrevBlock()->removeNextBlock(block->getBlockKey());
}
block->setBlockKey(blockKey, static_cast<SizeType32>(blockKey.uniqueTokens.size()) == mTokensPerBlock);
block->setPrevBlock(searchRoot);
block->setPrevBlockInSeq(searchRoot);