Skip to content

feat(agent): checkpoint CUDA multicast state - #133

Closed
galletas1712 wants to merge 2 commits into
feat/snapshot-cuda-vmm-multicast-posixfrom
fix/cuinterpose-restore-access-and-multicast-lock
Closed

galletas1712 wants to merge 2 commits into
feat/snapshot-cuda-vmm-multicast-posixfrom
fix/cuinterpose-restore-access-and-multicast-lock

Conversation

@galletas1712

@galletas1712 galletas1712 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • intercept and virtualize same-node POSIX CUDA multicast objects, devices, bindings, mappings, and access state
  • tear down multicast topology before unicast/native CUDA checkpoint and rebuild it from fresh objects after restore
  • preserve the application's original multicast creation properties while separately tracking the largest range accepted by the driver
  • serialize that driver-accepted extent for topology validation, avoiding rejection when r615 rounds multicast physical capacity above the requested size
  • avoid holding shared interposer state locks across collective multicast driver calls and revalidate phase after reacquiring them
  • use bounded control-socket timeouts and detached control threads

The generic unicast access-range fix lives in #152. This is the multicast layer of stack #156; follow-on fixes #165, #166, #167, and #174 are stacked above it.

r615 root cause

The deployed workload loads the locally built r615.68 libcuda exactly (SHA-256 9edeb49896e9b8d8dfb45dd1c9f3930c137f2d8f358f66594bb146b35437d850). In r615.68, multicast creation retains the public requested size but memDeviceBlockAllocMulticastObjectRM rounds physical capacity to the 512 MiB FLA page size. FlashInfer consequently creates a smaller logical object and successfully binds/maps the 512 MiB driver-recommended extent.

The interposer previously serialized only the smaller creation size. Its coordinator then rejected the valid 512 MiB binding before native CUDA checkpoint with invalid multicast binding. The fix records successful map/bind ranges as the effective extent while retaining the original properties for multicast object identity and replay. No driver change, FLA disable, FABRIC disable, or device-to-device copy is involved.

Validation

  • fake-driver regression: request a 2 KiB multicast object, accept an 8 KiB map, and require the serialized record to contain the 8 KiB driver-accepted extent
    • before: FAIL: multicast record uses driver-accepted extent
    • after: multicast behavior OK
  • native CUDA checkpoint tests cover POSIX symmetric-memory CUDA graphs and two-GPU multicast symmetric-memory CUDA graphs
  • go test ./api/... ./operator/... ./agent/...
  • GLM 5.2 / DeepSeek-V4-Flash-NVFP4 SGLang TP8/EP8 on eight B200 GPUs with the fixed r615.68 userspace driver:
    • the previous interposer fails during prepare with topology validate failed: invalid multicast binding
    • the fixed stack completes checkpoint, restores active and standby engines, and returns coherent post-restore inference (17 * 23 = 391)
    • after terminating the active engine, the standby acquires the GMS lock in about 121 ms, registers in about 4.0 s, and again returns 391

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 60566c92-35e0-44aa-8976-dc81af0b0d78

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from a553235 to 71fba9e Compare September 1, 2026 06:17
@galletas1712 galletas1712 changed the title fix(agent): restore access permissions and unblock collective multicast calls feat(agent): checkpoint CUDA multicast state Sep 1, 2026
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from 71fba9e to 706f5d6 Compare September 1, 2026 06:23
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from 706f5d6 to 6a857be Compare September 1, 2026 07:45
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from 6a857be to cda1b03 Compare September 1, 2026 07:59
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from cda1b03 to fd8a929 Compare September 1, 2026 08:20
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from fd8a929 to 2366c68 Compare September 1, 2026 08:23
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch 2 times, most recently from aeba6f2 to f0d974b Compare September 2, 2026 07:50
Track same-node POSIX multicast objects, devices, bindings, mappings, and access state. Tear down multicast topology before native checkpoint and rebuild it from fresh objects after unicast restore.

Avoid holding the shared state lock across collective driver calls, use bounded socket timeouts without raising the shim glibc floor, and validate complete groups before resume.

Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from f0d974b to 4a5624e Compare September 2, 2026 08:35
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from 4a5624e to 5608435 Compare September 2, 2026 20:13
@galletas1712
galletas1712 force-pushed the fix/cuinterpose-restore-access-and-multicast-lock branch from 5608435 to 4a5624e Compare September 2, 2026 20:20
Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
@galletas1712

Copy link
Copy Markdown
Contributor Author

Superseded by #219 (multicast state); the parallel PREPARE_MULTICAST dispatch from c47baab is covered by a coordinator test in #216. The re-cut stack (#212#220) supersedes this PR. Its body is quoted verbatim in the replacement's Origin section, and each review thread here has a row in the replacement's "Review threads carried" table with what was done about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant