Repository navigation
[CP] Automatically enable BCG for supported prefill CP configurations - #44022
Conversation
|
/rerun-test test/registered/cp/test_gpt_oss_4gpu_mxfp4_cp.py test/registered/cp/test_deepseek_v4_flash_fp4_b200_cp.py |
|
🚀 |
non_mechanical_provable: change resolution order so CP default selection precedes shared graph policies, and budget static memory from the resulting graph configuration.
This reverts commit 2b21288.
|
/rerun-test test/registered/cp/test_gpt_oss_4gpu_mxfp4_cp.py test/registered/cp/test_deepseek_v4_flash_fp4_b200_cp.py |
|
🚀 |
|
/rerun-test test/registered/cp/test_gpt_oss_4gpu_mxfp4_cp.py test/registered/cp/test_deepseek_v4_flash_fp4_b200_cp.py |
|
🚀 |
Resolve the modify/delete conflict on test/registered/unit/layers/cp/test_dsv4_prefill_cp_bcg.py by keeping its deletion from sgl-project#44022; the PR's one-line `trtllm_attn=False` mock edit there is no longer needed. Also picks up the main commit required by the CI maintenance rebase gate (c053fc7, sgl-project#21065). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@Fridge003 Cause: unlike eager CP ( Fix: ROCm results (DeepSeek-V4-Flash TP4, MI355X): without the fix, CP+BCG fails during graph capture with exactly this mismatch ( It would be great if CUDA and ROCm could share the same fix rather than diverge. Would you be open to this approach for CUDA as well? If so, #43819 can re-enable |
… for DSV4 on ROCm sgl-project#44022 dropped (interleave, dsv4) from the supported CP BCG combinations because the capture path did not shard input_ids with the hidden states for DSV4 hash routing. This branch fills input_ids_global from the CP BCG input buffers, so add the combination back on ROCm, where it is validated. CUDA keeps it disabled until the same path is validated on B200. Restore test_dsv4_prefill_cp_bcg.py with the DSV4 CP BCG checks and make the supported-configuration check follow the platform.
Motivation
Supported prefill context-parallel configurations should select breakable CUDA graphs automatically. DSV4 is temporarily excluded because its CP BCG capture path does not shard token IDs consistently with hidden states for hash routing.
Modifications
Centralize supported
(ContextParallelStrategyKind, CPAttentionBackendKind)pairs inlayers/cp/bcg.py: zigzag + TRT-LLM MHA. Keep the DSV4 backend enum, but exclude interleave + DSV4 until the capture input-ID mismatch is fixed.Keep automatic prefill BCG selection and compatibility checks in
cuda_graph_hook.py::apply_prefill_cp_cuda_graph_default. The resolution pipeline invokes this hook immediately after context-parallel configuration resolves, only whenenable_prefill_cpis enabled, retaining the existing CP=TP and PP=1 requirements and explicit user backend choices.parallel_hook.pyis unchanged by this PR.DSV4 remains disabled by default while it is absent from the supported set. Preserve other compatibility restrictions, PD role rules, and DeepEP bucket alignment.
Remove the explicit BCG flags from the GPT-OSS CP test and delete
test_dsv4_prefill_cp_bcg.pyas requested.Defer the CP-related BCG warning until
apply_prefill_cp_cuda_graph_defaultfinishes; warn only if the resulting prefill backend is not breakable. Early CP auto-disable remains silent so supported configurations do not log a misleading disable/enable sequence.Accuracy Tests
Speed Tests and Profiling
Not run; no kernel or model-forward implementation changes.
CI States
Latest PR Test (Base): ❌ Run #38495427918
Latest PR Test (Extra): ❌ Run #38495428025
Latest PR Test (AMD ROCm 10): ❌ Run #38495428053