feat(agent): checkpoint CUDA multicast state - #219
Closed
galletas1712 wants to merge 2 commits into
Closed
galletas1712 wants to merge 2 commits into
galletas1712 wants to merge 2 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This was referenced Sep 4, 2026
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
from
September 4, 2026 20:10
78ea84d to
a6f2a3b
Compare
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
from
September 11, 2026 02:23
a6f2a3b to
e861fc1
Compare
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
from
September 11, 2026 06:10
e861fc1 to
fdbdaca
Compare
galletas1712
removed this pull request from stack #221
September 11, 2026 06:11
galletas1712
added this pull request to stack #293
September 11, 2026 06:11
This was referenced Sep 11, 2026
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
from
September 11, 2026 06:16
fdbdaca to
9e00774
Compare
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
from
September 11, 2026 06:21
9e00774 to
ecd0c89
Compare
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
2 times, most recently
from
September 11, 2026 08:31
c4767e7 to
a3cd49c
Compare
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
from
September 11, 2026 09:41
a3cd49c to
5f693d2
Compare
Extend cuinterpose tracking and sealed allocation-ID tickets to POSIX-exportable CUDA multicast objects. Record object properties, effective extent, attached devices, BindMem and BindAddr operations (including CUDA 13.1 device-explicit forms), mappings, and access grants. Collective driver calls run without the shim state lock and revalidate their objects after returning. PREPARE_MULTICAST drops cached exports, unmaps ranges, unbinds members, and releases objects before unicast teardown. Restore rebuilds multicast after unicast through four barrier-separated operations: RESTORE_MULTICAST_CREATORS, RESTORE_MULTICAST_IMPORTERS, RESTORE_MULTICAST_DEVICES, and RESTORE_MULTICAST_BINDINGS. The final barrier is required because binding can wait until every team device is attached. Non-POSIX exportable objects pass through while running and trigger the common checkpoint preflight refusal. Fake-driver tests cover two-rank restore, effective-extent rounding, both binding forms, descriptor teardown order, and unsafe untracked members. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
galletas1712
force-pushed
the
feat/cuinterpose-multicast-state
branch
from
September 11, 2026 10:08
5f693d2 to
d87583b
Compare
Co-authored-by: OpenAI <noreply@openai.com> Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
This was referenced Sep 12, 2026
Contributor
Author
|
Superseded by the replacement 13-PR C-frontend/Rust-backend cuinterpose draft stack: https://github.com/ai-dynamo/snapshot/stack/339 (#326–#338), tracking approved proposal #295. The new stack preserves one reviewable stage per PR, with tests collected in #338 and the design in #337. PageBroker transfer changes remain a separate dependency. Closing this older C implementation; retaining its branch and discussion for reference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Layer 10 of the eleven-PR cuinterpose stack #293, based on #218. Closed PR #214 is not in the active stack.
This PR extends logical handles, descriptor tickets, export-cache ownership, inspection, and lifecycle state to CUDA multicast objects used by NCCL NVLS and PyTorch symmetric memory.
Tracked objects use exactly the POSIX FD handle type. Private handle-type-0 multicast objects remain native. Unsupported nonzero handle types run normally but cause preflight refusal before teardown.
Private versus shared VMM ownership
The updated #218 leaves private VMM allocations to native CUDA checkpoint, even if those allocations are POSIX-export-capable. This layer retains the important exception: successful binding of a tracked allocation into multicast marks that allocation shared. Such members still use the interposer's host-carrier and reconstruction path even when the application never exported a unicast ticket.
Private allocations never exported and never bound into tracked multicast remain mapped with their native handles intact during interposer preparation. Native CUDA owns their checkpoint and restore. Legacy
cuIpc*ownership is unchanged.Multicast lifecycle
The shim records requested properties, observed extent, attached devices,
BindMem/BindAddrbindings, maps, and access grants. Unsupported untracked handle bindings remain refused; address bindings retain their existing native-address contract.Multicast preparation runs concurrently across participants, closing exports, unmapping ranges, unbinding members, and releasing object handles before shared unicast teardown.
After creator and importer unicast reconstruction, multicast restore uses:
The barriers prevent descriptor-fetch and collective bind/add-device deadlocks. Collective driver calls execute without the main state lock, then revalidate object identity and lifecycle state before committing topology.
Stack transport
The private-VMM ownership fix is introduced in #218 and merged forward here without rewriting the existing branch history. This update adds no NIXL transfer code, CustomStorage implementation, driver patch, or phase-batching experiment to the interposer stack.
Validation
Source review confirms that successful tracked multicast binding still sets
allocation->shared; the inherited shared-only predicate therefore preserves member content. Preparation checks passed:git diff --checkand strict C syntax checking against CUDA 13.1 headers.Candidate
a554da95b54d6f375a0f938f45be209b6ba3a986passes all 74 native fake-driver tests, including five lifecycle and six multicast tests, with the configured ASan/UBSan instrumentation. Tests used CUDA 13.1 headers, the system GCC/G++ toolchain, cached GoogleTest, and a short control-socket directory. Logs:stack-private-vmm/pr219-final-tests.log.The full stack at exact #220 head
21008b50b93a9879a805665e331e777bb93abf49, including this update, passed all 3 physical-GPU tests with 0 skips and 0 failures in 19.896 s on two B200 GPUs on nscale-dev, 2026-09-12 UTC. This is full-stack GPU validation, not a standalone GPU run of #219. Historical results for 73 native tests refer to old stack head0eae9c4f9b66093332f00a332afaf56048e1e64a, not this update.Contribution notes
This updates the existing stack rather than creating duplicate work. AI assistance was used; human review and actual test results remain required.
GPU compilation used the documented
ALLOW_OLD_CUDA_HEADERS=1override with CUDA 13.0 headers. No CustomStorage, NIXL, or driver-experiment changes are included in this stack update.