feat: deliver CUDA tools and launch multi-GPU sources - #213
Closed
galletas1712 wants to merge 1 commit into
Closed
galletas1712 wants to merge 1 commit into
galletas1712 wants to merge 1 commit 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-delivery
branch
from
September 4, 2026 20:10
e20e3ae to
fea0c71
Compare
galletas1712
force-pushed
the
feat/cuinterpose-delivery
branch
from
September 11, 2026 02:23
fea0c71 to
9a5a63b
Compare
galletas1712
force-pushed
the
feat/cuinterpose-delivery
branch
from
September 11, 2026 06:10
9a5a63b to
7429b58
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
galletas1712
force-pushed
the
feat/cuinterpose-delivery
branch
2 times, most recently
from
September 11, 2026 06:21
c3e738b to
7613387
Compare
galletas1712
force-pushed
the
feat/cuinterpose-delivery
branch
from
September 11, 2026 06:41
7613387 to
97bee3b
Compare
1 task
galletas1712
force-pushed
the
feat/cuinterpose-delivery
branch
from
September 11, 2026 08:31
97bee3b to
41b4c21
Compare
Deliver cuda-checkpoint and libcuinterpose.so from Snapshot's configured agent image into every source Pod checkpoint target. One init container copies the tools into a shared emptyDir, every target mounts it read-only at /tmp/snapshot-cuda, and restore recreates the same path before CRIU reopens file-backed mappings. The shim remains inert unless a later change adds it to LD_PRELOAD. Wrap only targets that may use more than one GPU with cuda-checkpoint --launch-job. GPU count includes nvidia.com/gpu resources and DRA claims; unknown DRA sizes are conservatively wrapped. Persist the driver's launch-job file in the Snapshot control volume, verify the delivery and wrapper contracts when adopting Jobs, and reject a multi-GPU source that bypassed the wrapper. The agent records CUDA-tool delivery in the checkpoint manifest, and restore bind-mounts the bundled tools into the workload namespace before CRIU runs. Operator flags and Helm values select the agent image and pull credentials. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
galletas1712
force-pushed
the
feat/cuinterpose-delivery
branch
from
September 11, 2026 10:08
41b4c21 to
3f12b0c
Compare
This was referenced Sep 16, 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 2 of the eleven-PR cuinterpose stack #293. Closed PR #214 is intentionally not in the active stack.
This PR applies the CUDA launch-job requirement where Snapshot shapes source Pods and makes the required binaries available at stable paths. It does not opt a workload into cuinterpose.
ShapeCUDAToolscreates onesnapshot-cudaemptyDir, runs an init container from the configured Snapshot agent image, copiescuda-checkpointandlibcuinterpose.so, and mounts both tools read-only at/tmp/snapshot-cudain every target container. Tool delivery is unconditional for Snapshot targets and is independent of cuinterpose opt-in.Only a target that may use more than one GPU has its command rewritten under:
The CUDA job file is persisted in Snapshot's control volume. The operator counts
nvidia.com/gpuresources and referenced DRA claims; indeterminate claim sizes are conservatively treated as multi-GPU because unnecessary wrapping is harmless while missing it causes a late capture failure. Existing source Jobs are verified for universal tool delivery and, where required, the launch wrapper before adoption.Delivery and interposition remain separate. The mounted shim is inert until #222 puts it in
LD_PRELOAD; opting into cuinterpose does not change the GPU-count-based launch rule.The
snapshot-controlvolume,/snapshot-controlmount, and canonical and legacy control-directory variables are reserved. If a workload predefines them, source shaping accepts only oneemptyDir, one exact writablesubPath=<container-name>mount, and literal/snapshot-controlvariable values. PVC,hostPath, alternate-volume, broad-mount, read-only, duplicate, andvalueFromcollisions are rejected atomically. This matches restore-side fail-closed validation and prevents the coordinator socket directory from becoming cross-Pod storage.At capture, the manifest records
cudaTools.delivered. Restore recreates/tmp/snapshot-cudabefore CRIU by using the fixedns-bind-mountrole, allowing CRIU to reopen the launch wrapper and shim at their original file-backed paths.Stack boundary
Based on #212. #222 adds explicit Pod opt-in and preloads the shim. This PR does not create control sockets, run the coordinator, or track CUDA state.
Validation
On the final stack,
make testpasses inapi,agent, andoperator. The source-shaping tests cover the exact reserved-volume contract and atomic rejection of unsafe collisions. The pinned CUDA 13.1 builder compiles the production binaries and passes all cuinterpose fake-driver suites. The final published stack head0eae9c4f9b66093332f00a332afaf56048e1e64apassed the fullmake checkgate, the CUDA 13.1 production build, and all 73 sanitizer-backed native cuinterpose tests. Its physical-GPU suite passed all 3 tests with no skips on two DRA-assigned NVIDIA B200 GPUs. The unicast test kept an explicit allocation-ID ticket-backed peer mapping per worker live across capture and restore; the multicast test required a nonzero multicast VA and shim-logical handle, exercisedBindAddr, and passed its collective and captured-graph replay. Detailed hardware evidence and measurements are in #220.