[DSpark] Support pipeline-parallel targets in aggregated serving (#56956)
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com> Co-authored-by: Kimi Code <noreply@moonshot.cn> Co-authored-by: Yongye Zhu <zyy1102000@gmail.com>
This commit is contained in:
co-authored by
Kimi Code
Yongye Zhu
parent
15ed1262e7
commit
157bcb7c48
@@ -805,6 +805,15 @@ class Worker(WorkerBase):
|
||||
|
||||
@instrument(span_name="Warmup (GPU)")
|
||||
def compile_or_warm_up_model(self) -> CompilationTimes:
|
||||
# All warmup phases below run synthetic steps whose sampled outputs are
|
||||
# discarded. The PP sampled-token broadcast would carry no payload, and
|
||||
# its side-stream NCCL ops can overlap the next step's activation p2p
|
||||
# and deadlock the pipeline, so keep it disabled for the whole warmup
|
||||
# window and restore it before serving.
|
||||
pp_handler = getattr(self.model_runner, "pp_handler", None)
|
||||
if pp_handler is not None:
|
||||
pp_handler.set_disabled(True)
|
||||
|
||||
warmup_sizes: list[int] = []
|
||||
|
||||
if (
|
||||
@@ -983,6 +992,9 @@ class Worker(WorkerBase):
|
||||
# gate so subsequent `execute_model` / `sample_tokens` calls enforce it.
|
||||
enable_gpu_sync_check()
|
||||
|
||||
if pp_handler is not None:
|
||||
pp_handler.set_disabled(False)
|
||||
|
||||
return CompilationTimes(
|
||||
language_model=self.compilation_config.compilation_time,
|
||||
encoder=self.compilation_config.encoder_compilation_time,
|
||||
|
||||
Reference in New Issue
Block a user