Skip to content

Commit 9eb686a

Browse files
committed
undo faulty update
1 parent e8f941a commit 9eb686a

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

python/sglang/srt/managers/scheduler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,7 @@ def run_batch(
17641764

17651765
model_worker_batch = batch.get_model_worker_batch()
17661766
if self.enable_overlap:
1767+
# TODO (timmy): Do not alias seq_lens between forward and scheduler threads.
17671768
# Optimistically estimate the seq_lens_cpu for the next draft forward
17681769
model_worker_batch.seq_lens_cpu.add_(self.server_args.speculative_num_steps + 1)
17691770

python/sglang/srt/managers/scheduler_output_processor_mixin.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,6 @@ def process_batch_result_decode(
231231
self.token_to_kv_pool_allocator.free(free_cache_loc_cpu.to("cuda", non_blocking=True))
232232

233233
if self.spec_algorithm.is_eagle():
234-
# TODO (timmy): when does this happen?
235-
if batch.seq_lens is not None:
236-
batch.seq_lens.add_(logits_output.accept_length + 1)
237-
238234
accept_length = logits_output.accept_length.tolist()
239235
idx_to_batch = [i for i, length in enumerate(accept_length) for _ in range(length + 1)]
240236
else:

python/sglang/srt/speculative/eagle_worker.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,6 @@ def forward_batch_speculative_generation(
338338
)
339339
return logits_output, next_token_ids, None, bid, False, batch.spec_info
340340
else:
341-
# Clone seq_lens because it will be modified in-place by verify
342-
batch.seq_lens = batch.seq_lens.clone()
343-
344341
with self.draft_tp_context(self.draft_model_runner.tp_group):
345342
spec_info = self.draft(batch)
346343
logits_output, verify_output, can_run_cuda_graph = (

0 commit comments

Comments
 (0)