[https://nvbugs/6402058][fix] [None][fix] Remove stale prepare_inputs event sync to unhang DS-V3 EP4 MTP - #15849
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis PR removes CUDA-event-based synchronization ( ChangesPrepare-Inputs Synchronization Removal
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
3986aaa to
ce042d5
Compare
ce042d5 to
787c18a
Compare
|
AI suggests this should wait #16088 to be merged first. DetailFor the target DS-V3-Lite / V1 KV-cache path, yes: the original behavior is still correct because the race that Why
|
| padded_requests.context_requests, | ||
| padded_requests.generation_requests, | ||
| ) | ||
|
|
There was a problem hiding this comment.
787c18a to
4de2722
Compare
…tion `PyTorchModelEngine._forward_step_intra_graph` allocated a fresh `torch.cuda.Event` every forward pass into `self._prepare_inputs_event` and recorded it, but its only reader (`wait_for_input_copy()`) has zero callers anywhere in the codebase. On SM120 + MTP nextn=2 + attention_dp + overlap scheduler + torch.compile with piecewise CUDA graph, the per-iteration event churn (allocate, record, drop previous for GC) can serialize `cudaEventDestroy` in the Python GC thread against in-flight MoE all-to-all streams, manifesting as a silent IPC-poll hang. Delete the allocation, the class-level attribute, and the unused `wait_for_input_copy` method; unwaive the affected test. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com> Signed-off-by: handongl <handongl@nvidia.com>
4de2722 to
0a5fa44
Compare
Summary
PyTorchModelEngineheld a leftover_prepare_inputs_eventrecorded after_prepare_and_schedule_batchand synchronized viawait_for_input_copy(). In the DeepSeek-V3-Lite EP4 + MTP2 + attention_dp + CUDA-graph + overlap-scheduler + torch.compile configuration, this extra CUDA event synchronization interacted badly with the overlap scheduler on the 4-GPU post-merge stage, causing the executor to block indefinitely on IPC poll._prepare_inputs_eventfield, its record site in the forward path, and thewait_for_input_copy()helper, since input-copy ordering is already guaranteed by the stream/graph semantics elsewhere. The corresponding waive entry for nvbugs/6402058 was dropped fromwaives.txtso the previously hanging DeepSeek-V3-Lite EP4 MTP2 test re-enters CI to confirm the fix.Test plan
Links
Summary by CodeRabbit