Why do PDMux Prefill and Decode kernels show no temporal overlap? #33652
Replies: 1 comment
|
I think the behavior you're seeing can be expected, and
With PDMux, Prefill and Decode can be assigned different Green Contexts / SM partitions, but that does not guarantee that Nsight will show continuous simultaneous kernel execution. The contexts make concurrent execution possible by restricting the SM resources available to each workload, but actual overlap still depends on whether both sides have runnable work at the same time and on synchronization/dependencies between the split forwards. In your configuration, I would specifically look at two things. First, you have: PDMux splits the prefill forward pass according to this budget. If those split-forward regions are relatively coarse for Qwen3-1.7B on a 3080 Ti, Decode may only get scheduling opportunities around the boundaries between Prefill chunks. In Nsight this can look much more like alternating Prefill/Decode execution than continuous kernel-level overlap. Second, the selected SM partition depends on and no That can also explain why TTFT becomes worse: PDMux deliberately gives some GPU resources/scheduling opportunities to Decode while Prefill is active. On a relatively small model such as Qwen3-1.7B, the benefit from protecting Decode may not compensate for the reduced Prefill throughput and additional split-forward/scheduling overhead. I would try three comparisons:
So I wouldn't interpret the trace as evidence that Green Contexts themselves are failing to provide isolation/concurrency. PDMux provides the resource partitioning needed for Prefill and Decode to coexist, but it doesn't imply that every Prefill kernel should visibly overlap a Decode kernel. The amount of actual overlap is determined by the workload, split-forward granularity, selected SM partition, and synchronization points. The increased TTFT is therefore also plausible: you're trading some Prefill performance for better Decode isolation/concurrency, and that tradeoff can be unfavorable for this particular Qwen3-1.7B + 3080 Ti workload. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Command
Launch a pdmux server:
Benchmark:
pdmux_config.yml:
Phenomenon
I compared performance with and without
--enable-pdmuxand found that TTFT increases significantly when PDMux is turned on. To diagnose this, I profiled the PDMux-enabled configuration usingnsys; the results are shown below.According to the nsys profile, Green Context 3 is assigned to Prefill and Green Context 4 to Decode. After the initial large-batch Prefill wave finishes, the two contexts appear to execute in a strictly alternating manner with almost no temporal overlap.
Question
Is this expected, or is there a known bottleneck (e.g., launch latency, stream synchronization, or SM scheduling) that prevents them from running concurrently?
All reactions