Skip to content

Commit 648094e

Browse files
Update xllm/core/framework/block/block_manager_pool.cpp
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 1bf4433 commit 648094e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xllm/core/framework/block/block_manager_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ bool BlockManagerPool::allocate(Sequence* sequence, size_t num_tokens) {
218218
if (blocks.size() != num_additional_blocks) {
219219
if (started_empty) {
220220
block_managers_[dp_rank]->deallocate(sequence->kv_state().kv_blocks());
221-
sequence->reset();
222221
if (needs_embedding_id) {
223222
deallocate_embedding_id(sequence, dp_rank);
224223
}
224+
sequence->reset();
225225
}
226226
// LOG(ERROR) << " Fail to allocate " << num_additional_blocks << "
227227
// blocks.";

0 commit comments

Comments
 (0)