Skip to content

Commit

Permalink
Removed not used code.
Browse files Browse the repository at this point in the history
  • Loading branch information
popovaan committed Jul 5, 2024
1 parent 59d9cde commit a2fd89a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
9 changes: 0 additions & 9 deletions src/cpp/continuous_batching/src/sampler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,6 @@ SamplerOutput Sampler::sample(std::vector<SequenceGroup::Ptr> & sequence_groups,
if (m_beam_search_info.find(request_id) == m_beam_search_info.end()) {
m_beam_search_info.emplace(request_id, GroupBeamSearcher(sequence_group));
}
else {
// sequence group can be empty if returned after preemption
if (sequence_group->is_empty()) {
// clear beam search info
m_beam_search_info.erase(request_id);
m_beam_search_info.emplace(request_id, GroupBeamSearcher(sequence_group));
}
}


// current algorithm already adds new tokens to running sequences and
m_beam_search_info.at(request_id).select_next_tokens(sequence_group_logits, sampler_output);
Expand Down
18 changes: 0 additions & 18 deletions src/cpp/continuous_batching/src/sequence_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,24 +378,6 @@ class SequenceGroup {
return m_sampling_params;
}

void reset() {
m_sequences.clear();
m_next_sequence_id = 0;
add_sequence(Sequence::create(m_next_sequence_id++));
clear_scheduled_tokens();
m_num_processed_tokens = 0;
m_max_content_len = 0;
}

bool is_empty() {
if (m_sequences.size() > 1)
return false;
OPENVINO_ASSERT(m_sequences.size() == 1);
if (m_sequences[0]->get_generated_len() > 0 || m_sequences[0]->get_cumulative_log_probs() != 0.0f)
return false;
return true;
}

void set_out_of_memory() {
for (size_t seq_id = 0; seq_id < m_sequences.size(); ++seq_id) {
if (m_sequences[seq_id]->is_running()) {
Expand Down

0 comments on commit a2fd89a

Please sign in to comment.