Repository navigation
[Refactor] bcg: Delete capture leftovers and rename capture_stub to on_capture - #46792
Conversation
…; rename capture_stub to on_capture
370ad67 to
035c636
Compare
|
/rerun-test registered/unit/layers/test_radix_attention.py test_radix_linear_attention.py test_cp_strategy_unit.py test_eager_on_graph.py test_prefill_cuda_graph_runner_helpers.py registered/unit/layers/moe/paged_experts/test_paged_experts.py test_dsv41_late_layer_tail_readers.py registered/cuda_graph/breakable/test_breakable_cuda_graph.py test_bcg_with_lora.py test_bcg_with_speculative_decoding.py test_dp_attention_bcg_kl.py test_mamba_cache_kl.py test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py test_deepseek_v4_flash_fp4_b200.py test_unified_cache_linker_kl_dsv41.py test_attention_bcg_outputs.py test_qwen_image21.py test_diffusion_bcg_tp_graph_capture.py test_diffusion_bcg_zimage_turbo.py test_diffusion_bcg_tp2_zimage_turbo.py |
|
🚀 🚀 🚀 🚀 🚀 🚀 🚀 |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
- sgl-project#46719 records an eager_on_graph break at capture without running it, so a break returns None (sgl-project#46792 renamed capture_stub to on_capture). The step graph's grammar mask break fills the runner-owned mask and returns None, and the child-graph test's break writes into a buffer the test owns. - sgl-project#45474 draws the simulated acceptance length from the worker's generator (generate_simulated_accept_index(generator=)). The step graph's override takes the generator and keeps it with the draw arguments, so a replay draws from it as the eager step does.
Since #46719 the capture pass records each graph break without running it. This removes what that left with no effect.
barrier_fnfromBreakableCUDAGraphCaptureand its two callers. It synced ranks before break bodies with rank-coupled collectives, and none run at capture now.capture_stubtoon_capture. It now adds host setup at capture instead of replacing the body. The remaining users are the DeepSeek V4 tail enter and exit, the tail source KV layer id, and the Nemotron-H shared-expert side graph._barrier_fnmocks and follow the rename.No behavior change at replay. At capture, ranks no longer barrier at each break, and the deleted stubs no longer write their output buffers.
Known issue on HIP, pre-existing and not changed here: under the breakable prefill graph, the decoder SWA bounded-replay tail is switched in only at capture, not at replay.
init_forward_metadata_for_breakable_cuda_graph_captureindeepseek_v4_backend_hip_radix.py) and refreshes none at replay, soLateLayerTail.scatter_indicesis None andtail_in_graphis False.deepseek_v4.pythen takes the eager branch,attn_backend.enter_late_layer_tail(...), which is segment code: it runs while the graph captures and never at replay. Replays reuse the capture batch's tail rows and metadata, andtail_source_kv_layer_id, which the source KV break sets at every replay, is never cleared.Tests run at this head on B300 and GB300 pass:
test_breakable_cuda_graph.py,test_bcg_with_speculative_decoding.py,test_dp_attention_bcg_kl.py,test_bcg_with_lora.py,test_lora_moe_prefill_cuda_graph.pyandtest_mamba_cache_kl.py;Two tests fail the same way on main: the
test_paged_experts.pyGPTQ class and onetest_deepseek_v41_bcg_multimodal.pycase.CI States
Latest PR Test (Base): 🚫 Run #40585489132
Latest PR Test (Extra): ❌ Run #40585489265
Latest PR Test (AMD ROCm 10): ⏳ Run #40585489123