fix(sglang): Warm snapshot engine before capture - #32
Merged
Conversation
rst0git
force-pushed
the
fix/sglang-snapshot-warmup
branch
from
July 14, 2026 12:56
d0bd94a to
376f1e5
Compare
rst0git
force-pushed
the
fix/sglang-snapshot-warmup
branch
6 times, most recently
from
July 14, 2026 14:13
e75c030 to
c716a64
Compare
Snapshot capture can start before SGLang has executed a real generation request, leaving model state uninitialized in the checkpoint. Warm generation engines with a bounded request before capture, while keeping skip, debug, data-parallel, and non-generation paths unchanged. Signed-off-by: Radostin Stoyanov <radostin@doubleword.ai>
A restored process must see the same CUDA device ordering and thread-local device context that it had during capture. Resolve DRA GPUs in container ordinal order, bind saver workers before touching CUDA, and expose CRIU direct I/O for checkpoint storage. Signed-off-by: Radostin Stoyanov <radostin@doubleword.ai>
GMS mappings become read-only after publication, but buffers and auxiliary tensors may still be updated by the model. Keep parameters in shared memory and copy writable non-parameter tensors into private CUDA memory before later updates can fault. Signed-off-by: Radostin Stoyanov <radostin@doubleword.ai>
The fork does not have the upstream Fastchecker runners, and several checks assumed infrastructure or documentation links that are not available here. Run Rust validation on hosted runners, lock tool installs to the repository toolchain, and make compliance and link checks understand the fork's inputs. Signed-off-by: Radostin Stoyanov <radostin@doubleword.ai>
rst0git
force-pushed
the
fix/sglang-snapshot-warmup
branch
from
July 14, 2026 14:14
c716a64 to
55b9939
Compare
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.
Overview:
Warm the direct SGLang generation path before Dynamo Snapshot freezes the process. Without this warmup, CUDA checkpoint fails for affected models with
CUDA_ERROR_OPERATING_SYSTEM.This backports ai-dynamo/dynamo@338a898b61 / ai-dynamo#10844 to the Doubleword fork.
Details:
skip_server_warmupand non-generation model behavioropenai_backend/worker.py, which the repository-wide hook otherwise changesValidation:
ruff checkpython3 -m compileallWhere should the reviewer start?
components/src/dynamo/sglang/snapshot.pyRelated Issues: