[TRTLLM-12721][fix] Add gated C++ NIXL in-flight cancellation and safe cleanup#15238
Conversation
|
/bot run --disable-fail-fast |
|
PR_Github #53406 [ run ] triggered by Bot. Commit: |
|
PR_Github #53406 [ run ] completed with state
|
d16f28c to
631cd67
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #53628 [ run ] triggered by Bot. Commit: |
|
PR_Github #53628 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #53788 [ run ] triggered by Bot. Commit: |
|
PR_Github #53788 [ run ] completed with state
|
631cd67 to
36f9ee5
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #53928 [ run ] triggered by Bot. Commit: |
|
PR_Github #53928 [ run ] completed with state
|
36f9ee5 to
ff622ff
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #54148 [ run ] triggered by Bot. Commit: |
ff622ff to
6954acf
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #54155 [ run ] triggered by Bot. Commit: |
|
PR_Github #54148 [ run ] completed with state |
|
PR_Github #54155 [ run ] completed with state
|
6954acf to
24eb554
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #54336 [ run ] triggered by Bot. Commit: |
|
/bot run |
|
PR_Github #54356 [ run ] triggered by Bot. Commit: |
|
PR_Github #54336 [ run ] completed with state |
Signed-off-by: Chien-Chun Hung <2679986+chienchunhung@users.noreply.github.com>
6f06a63 to
4b9db25
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #59016 [ run ] triggered by Bot. Commit: |
|
PR_Github #59016 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #59042 [ run ] triggered by Bot. Commit: |
|
PR_Github #59042 [ run ] completed with state
|
|
/bot run --disable-fail-fast --stage-list "DGX_B200-4_GPUs-PyTorch-3,DGX_B200-4_GPUs-PyTorch-Ray-1" |
|
PR_Github #59126 [ run ] triggered by Bot. Commit: |
|
PR_Github #59126 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #59232 [ run ] triggered by Bot. Commit: |
|
PR_Github #59232 [ run ] completed with state |
|
/bot run --post-merge --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-16_GPUs-2_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE1-GPU8-Post-Merge-2,DGX_B200-16_GPUs-2_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE1-GPU8-Post-Merge-3,DGX_B200-16_GPUs-2_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE1-GPU8-Post-Merge-6" |
|
PR_Github #59245 [ run ] triggered by Bot. Commit: |
|
PR_Github #59245 [ run ] completed with state |
|
/bot run --post-merge --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-16_GPUs-2_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE1-GPU8-Post-Merge-4,GB200-16_GPUs-4_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE2-GPU8-GEN1-NODE2-GPU8-Post-Merge-1,GB200-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge-1,GB200-24_GPUs-6_Nodes-PyTorch-Disagg-PerfSanity-CTX2-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-1,GB200-24_GPUs-6_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE2-GPU8-GEN1-NODE4-GPU16-Post-Merge-2" |
|
PR_Github #59257 [ run ] triggered by Bot. Commit: |
|
PR_Github #59257 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #59280 [ run ] triggered by Bot. Commit: |
|
PR_Github #59280 [ run ] completed with state |
Summary
This PR adds experimental, default-off deadline enforcement and in-flight KV-transfer cancellation for the PyExecutor C++ NIXL cache transceiver using the NIXL UCX plugin.
The change is self-contained at the request and transfer-resource boundary. When cancellation is enabled, a timed-out or user-cancelled request is not cleaned up merely because cancellation was requested. C++ transfer bookkeeping retains the request lifetime, and
TransferSessionretains any reserved staging-buffer slots until the distributed transfer outcome is terminal. Slots are released only when reuse is known to be safe; otherwise the transfer-buffer pool is poisoned fail-closed and the executor requires a process restart.Set
TRTLLM_DISAGG_ENABLE_INFLIGHT_CANCEL=1to opt in. The flag remains disabled by default.Activation and compatibility
Opt-in is accepted only with:
transceiver_runtime='CPP'or the C++ default);backend='NIXL'with the NIXL UCX plugin;kv_transfer_timeout_ms;Python/V2, direct UCX, MPI, Mooncake, NIXL Libfabric, the legacy C++ executor, and ambiguous legacy backend selection reject opt-in before an unsupported cancellation path can run. With the flag unset, existing timeout handling, backend selection, and transceiver behavior remain unchanged.
All participating ranks and both disaggregated services must use the same feature setting and compatible transport configuration. This PR does not negotiate cancellation capability between CTX and GEN.
Cancellation and cleanup flow
TransferSessionretains the receive-buffer reservations used by KV, MLA, and RNN formatters as cancellation races with terminal status.AsyncTransferManageror the active generation set until C++ reports a terminal distributed outcome. Attention-DP error handling votes on request IDs before entering response collectives.The opt-in path rejects
blockAll/nulloptwait-all status calls. Supporting wait-all semantics together with finite cancellation deadlines remains follow-up work.Scope boundaries
Because this PR now owns the minimum native session and buffer-safety envelope, #15794 should be rebased and narrowed to its remaining C++ protocol, capability, and teardown hardening instead of duplicating this implementation. #15795 continues to own the broader PyExecutor IPC and worker-lifecycle layer.
Dependency graph
Arrows point from prerequisite to dependent. The bounded-polling work originally proposed in #15181 was subsumed by merged #15356; #15356 and #15737 are inherited from
main.flowchart LR MAIN["main<br/>prerequisites merged"] PR15238["#15238 current<br/>gated cancellation + safe cleanup"] PR15794["#15794 draft<br/>remaining C++ protocol hardening"] PR15795["#15795 draft<br/>IPC and worker lifecycle"] PR15798["#15798 follow-up<br/>CTX/GEN mode negotiation"] PR15799["#15799 follow-up<br/>peer terminal protocol"] PR15738["#15738 draft<br/>qualified default-on policy"] MAIN --> PR15238 PR15238 --> PR15794 PR15794 --> PR15795 PR15794 --> PR15798 PR15798 --> PR15799 PR15795 --> PR15738 PR15798 --> PR15738 PR15799 -.->|or approved bounded fail/restart policy| PR15738 classDef merged fill:#d8f3dc,stroke:#2d6a4f,color:#1b4332 classDef current fill:#cfe8ff,stroke:#0969da,color:#0a3069,stroke-width:3px classDef draft fill:#fff3bf,stroke:#e67700,color:#7c2d12 classDef followup fill:#eeeeee,stroke:#6e7781,color:#24292f,stroke-dasharray: 5 4 class MAIN merged class PR15238 current class PR15794,PR15795,PR15738 draft class PR15798,PR15799 followupValidation
mainat1225445ceb; merged prerequisites are inherited frommain.git diff --checkand Python syntax compilation passed.transformersand the changed C++ bindings are not built. Exact-head CI remains required for compiled and distributed runtime validation.