Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions fastdeploy/worker/gpu_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,6 @@ def graph_optimize_and_warm_up_model(self) -> None:
):
self.model_runner.capture_model_prefill_and_mixed()

# Capture CUDAGraph for decode phase (all modes)
self.model_runner.capture_model()

# Block-wise CUDA graph capture (independent loop)
self.model_runner.capture_block_wise_graphs()

# Deterministic mode: reset RNG and share_inputs after warmup.
# Warmup _dummy_run() calls consume CUDA RNG state and leave stale
# data (infer_seed, stop_flags, seq_lens, etc.) in share_inputs.
Expand All @@ -257,6 +251,12 @@ def graph_optimize_and_warm_up_model(self) -> None:
set_random_seed(self.fd_config.model_config.seed)
self.model_runner.share_inputs.reset_share_inputs()

# Capture CUDAGraph for decode phase (all modes)
self.model_runner.capture_model()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 建议 多硬件同步检查

gpu_worker.py 修改了 CUDAGraph capture 的执行顺序(capture_model() 移到 deterministic reset 之后),如果其他硬件 Worker(dcu_worker.pyxpu_worker.pyiluvatar_worker.pymetax_worker.py 等)中有相同的 CUDAGraph capture 逻辑,是否也存在同样的 deterministic 模式问题?

建议:检查 fastdeploy/worker/{xpu,dcu,gcu,hpu,iluvatar,metax}_worker.py 中是否有类似 capture 顺序问题,如有,同步修复。


# Block-wise CUDA graph capture (independent loop)
self.model_runner.capture_block_wise_graphs()

def check_health(self) -> bool:
""" """
return True
Expand Down
Loading