File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
python/sglang/srt/disaggregation Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 21
21
22
22
import logging
23
23
from collections import deque
24
+ import time
24
25
from typing import TYPE_CHECKING , List , Optional
25
26
26
27
import torch
@@ -138,6 +139,8 @@ def pop_bootstrapped(self) -> List[Req]:
138
139
bootstrapped_reqs = []
139
140
indices_to_remove = set ()
140
141
142
+
143
+
141
144
if len (self .queue ) == 0 :
142
145
return []
143
146
@@ -298,6 +301,7 @@ def process_batch_result_disagg_prefill(
298
301
)
299
302
300
303
# Transfer kv for prefill completed requests and add it into disagg_prefill_infight_queue
304
+ t = time .perf_counter ()
301
305
if self .enable_overlap :
302
306
# wait
303
307
_ , next_token_ids = self .tp_worker .resolve_batch_result (bid )
@@ -307,6 +311,9 @@ def process_batch_result_disagg_prefill(
307
311
if self .disagg_launch_done is not None :
308
312
self .disagg_launch_done .clear ()
309
313
314
+ print (f"sample request: { time .perf_counter () - t :.2f} seconds" )
315
+ t = time .perf_counter ()
316
+
310
317
for req , next_token_id in zip (batch .reqs , next_token_ids , strict = True ):
311
318
req : Req
312
319
if req .is_chunked <= 0 :
@@ -321,6 +328,7 @@ def process_batch_result_disagg_prefill(
321
328
322
329
if self .enable_overlap :
323
330
self .send_kv_chunk (req , end_idx = req .tmp_end_idx )
331
+ print (f"send kv_chunk outter: { time .perf_counter () - t :.2f} seconds" )
324
332
325
333
def process_disagg_prefill_inflight_queue (self : Scheduler ) -> None :
326
334
"""
You can’t perform that action at this time.
0 commit comments