[https://nvbugs/6198785][fix] Unify phase-1 CUDA graph cleanup#16763
[https://nvbugs/6198785][fix] Unify phase-1 CUDA graph cleanup#16763Mgluhovskoi wants to merge 1 commit into
Conversation
15a7735 to
6b08982
Compare
6b08982 to
196d2d7
Compare
196d2d7 to
26eada4
Compare
|
/bot run --disable-fail-fast |
|
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 skipped from review as they are similar to previous changes (2)
WalkthroughThe estimating-KV-cache cleanup path now relies on ChangesKV cache cleanup and validation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #61123 [ run ] triggered by Bot. Commit: |
|
PR_Github #61123 [ run ] completed with state
|
|
/bot run |
2959953 to
6e0ef83
Compare
|
/bot run |
|
PR_Github #61331 [ run ] triggered by Bot. Commit: |
|
PR_Github #61331 [ run ] completed with state
|
|
/bot run |
|
PR_Github #61369 [ run ] triggered by Bot. Commit: |
|
PR_Github #61369 [ run ] completed with state
|
Signed-off-by: Maxim Gluhovskoi <mgluhovskoi@nvidia.com>
6e0ef83 to
0b8fdca
Compare
|
/bot run |
|
PR_Github #61392 [ run ] triggered by Bot. Commit: |
|
PR_Github #61392 [ run ] completed with state
|
|
/bot run |
|
PR_Github #61518 [ run ] triggered by Bot. Commit: |
|
PR_Github #61518 [ run ] completed with state
|
|
/bot run |
|
PR_Github #61596 [ run ] triggered by Bot. Commit: |
|
PR_Github #61596 [ run ] completed with state
|
|
/bot run |
|
PR_Github #61634 [ run ] triggered by Bot. Commit: |
|
PR_Github #61634 [ run ] completed with state |
Description
Fix a CUDA
unspecified launch failureduring DeepSeek-V3-Lite initialization when piecewise and outer CUDA graphs are captured during KV-cache memory profiling.Root cause
The failing snapshot released whole-model CUDA graphs during Phase-1 executor shutdown, but piecewise graph runners were not connected to that lifecycle. They could retain captures, outputs, address metadata, and private pool handles from the profiling allocation epoch, then replay stale state after final KV-cache allocation.
Current
mainconnects piecewise runners to the synchronizedPyExecutor.shutdown()path, which releases graphs before resource managers. The creator still retained a legacy second, conditionally gated graph release after manager teardown. Besides obscuring ownership, that duplicate release could rotate already-reset private pool handles a second time.Changes
PyExecutor.shutdown()as the single owner of Phase-1 graph destruction and remove the creator's legacy second release.Validation
git diff --check: passed.Impact
CUDA graphs captured during memory profiling are invalidated by one synchronized lifecycle owner and safely recaptured after final KV-cache allocation. Redundant private-pool rotation is avoided. There are no user-facing API changes.
Dev Engineer Review
unspecified launch failureduring KV-cache initialization by adjusting CUDA-graph/pool cleanup ownership:PyExecutor.shutdown()is the single owner of Phase-1 CUDA graph destruction, removing the creator-side duplicate release that could leave stale piecewise/outer graph state.kv_cache_creator.configure_kv_cache_capacity(py_executor), the code no longer conditionally releases Phase-1 CUDA graph pools and instead clears remainingeng.attn_metadataformodel_engineanddraft_model_engine.nvbugs/6198785waivers forTestDeepSeekV3Lite::test_bfloat16_4gpus.QA Engineer Review
tests/integration/test_lists/waives.txt.SKIPentries foraccuracy/test_llm_api_pytorch.py::TestDeepSeekV3Lite::test_bfloat16_4gpus:tp4,mtp_nextn=0,attention_dp=False,cuda_graph=Trueoverlap_scheduler=False/torch_compile=Falseandoverlap_scheduler=True/torch_compile=True(two waivers total), both referencingnvbugs/6198785.test-db/orqa/files were modified.