Skip to content

Commit 1436242

Browse files
committed
some log
1 parent ab79016 commit 1436242

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python/sglang/srt/disaggregation/prefill.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import logging
2323
from collections import deque
24+
import time
2425
from typing import TYPE_CHECKING, List, Optional
2526

2627
import torch
@@ -138,6 +139,8 @@ def pop_bootstrapped(self) -> List[Req]:
138139
bootstrapped_reqs = []
139140
indices_to_remove = set()
140141

142+
143+
141144
if len(self.queue) == 0:
142145
return []
143146

@@ -298,6 +301,7 @@ def process_batch_result_disagg_prefill(
298301
)
299302

300303
# Transfer kv for prefill completed requests and add it into disagg_prefill_infight_queue
304+
t = time.perf_counter()
301305
if self.enable_overlap:
302306
# wait
303307
_, next_token_ids = self.tp_worker.resolve_batch_result(bid)
@@ -307,6 +311,9 @@ def process_batch_result_disagg_prefill(
307311
if self.disagg_launch_done is not None:
308312
self.disagg_launch_done.clear()
309313

314+
print(f"sample request: {time.perf_counter() - t:.2f} seconds")
315+
t = time.perf_counter()
316+
310317
for req, next_token_id in zip(batch.reqs, next_token_ids, strict=True):
311318
req: Req
312319
if req.is_chunked <= 0:
@@ -321,6 +328,7 @@ def process_batch_result_disagg_prefill(
321328

322329
if self.enable_overlap:
323330
self.send_kv_chunk(req, end_idx=req.tmp_end_idx)
331+
print(f"send kv_chunk outter: {time.perf_counter() - t:.2f} seconds")
324332

325333
def process_disagg_prefill_inflight_queue(self: Scheduler) -> None:
326334
"""

0 commit comments

Comments
 (0)