Skip to content

Commit

Permalink
add cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-Chen222 committed Oct 11, 2024
1 parent 6298f2a commit c00ddec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/request_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,10 @@ void RequestManager::request_complete_clean_up(int batch_index) {
num_available_requests--;
request.status = Request::COMPLETED;

// page attention: free the pages
PageManager *page_manager = PageManager::get_page_manager();
page_manager->free_request(guid);

// Find the sos and eos in the sequence
auto bos_it = std::find(
request.tokens.begin(), request.tokens.end(), this->bos_token_id);
Expand Down

0 comments on commit c00ddec

Please sign in to comment.