Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Friendly bump for a first reviewer here. This is a small, focused correctness fix for the routed-experts host buffer when DP attention is on: the device-side allocation was sized for a single TP shard but the gather lands the full DP-aggregated rows, so we either OOB or silently truncate routing trajectories. The change just sizes the buffer for the gathered shape and adds a sanity check. cc @Kangyan-Zhou @ch-wan @merrymercy since this touches both the routed-experts capturer and DP attention paths. Happy to split further or add a regression test if helpful. |
alexnails
left a comment
There was a problem hiding this comment.
please update the FIXME given your change
b0c7e6f to
38f05f7
Compare
|
updated the FIXME, thanks for the review. |
|
/tag-and-rerun-ci |
The routed experts device buffer in RoutedExpertsCapturer can overflow when DP attention is enabled and max_running_requests is larger than chunked_prefill_size * dp_size. The buffer's first dim is currently max(chunked_prefill_size * dp_size, max_running_requests). On non-DeepEP DP-attention paths _get_local_slice goes through get_dp_local_slice_cpu, which returns local_start_pos = dp_rank * cuda_graph_batch under a cuda graph. On ranks with dp_rank > 0 the slice can walk past the end of the buffer when the second branch of the max wins.
The fix multiplies the second branch by dp_size so the buffer can hold the full concatenated batch across DP ranks. No-op when dp_size == 1 or when chunked_prefill_size * dp_size already dominates.
Originally part of #23999. Splitting it out as a standalone fix since the larger PR needs to be reworked on top of the recent state_capturer refactor (#24403, #24450).
Verified on an MoE model with DP attention where max_running_requests > chunked_prefill_size, which previously hit the overflow.
CI States
Latest PR Test (Base): ✅ Run #26649038783
Latest PR Test (Extra): ❌ Run #26649038428