Repository navigation
Train 2026-11-25b: closure attestation (#419, #420), fast cold start (#398) - #422
Merged
Merged
Conversation
Each of a target's PTX blobs is loaded twice (cudarc and raw driver), and each load is a JIT or a JIT-cache lookup. Serially, Qwen3.8-27B's 220 blobs took ~1 s of every engine start on GB10; on eight threads the backend is up ~0.3 s sooner. The calling thread still gets the context bound (AtlasCudaBackend::new reads it back), the maps are built in blob order, and the first failing blob stops the other loaders. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fast loader handed every tensor to one copier thread that copied it from pageable memory and drained the stream before the next. On GB10 that loaded Qwen3.8-27B's 18.8 GB in 3.05 s (6.2 GB/s) against ~10.5 GB/s of O_DIRECT reads from the same files. Plain tensors are now allocated in tensor order on the calling thread while 16 workers pread 16 MiB pieces into their own page-locked buffers and copy them on their own streams: 2.5-2.7 s, with a digest of every resident tensor's bytes identical to the old loader. CSF scale parts, F16 converts and tensors whose allocation fails keep the copier path and its managed-memory fallback. Linux only. Swept 4-32 workers and 8-64 MiB pieces; two buffers per worker measured slower (2.7-2.9 s). direct_io's pread loop is factored into aligned_window + pread_window so both paths share it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tokenizer phase (chat tokenizer, four whole-vocabulary decode passes, tool markers, XGrammar engine: ~1.2 s on Qwen3.8's 248K vocabulary) ran after the model was built, and the vocab cap parsed tokenizer.json again (~0.3 s) between the weights and the KV config. Both are CPU work that read none of the GPU phases. Rank 0 now starts the tokenizer phase on a thread before the weight load and uses its result at phase 8 only if every input it read (EOS list, vocab size after the tokenizer cap, model type, thinking support, template fields, ServeArgs) still equals the serial path's; otherwise it resolves in place as before. The vocab-size parse runs on a thread too. Qwen3.8-27B on one Spark with this and the two loader changes: ready in 7.3-8.1 s from a cold page cache against 9.1-11.1 s, with greedy outputs and logprobs identical to the old binary. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linux HIP builds take the pinned path as well (cfg!(target_os = "linux")), and serve identically there; the comment said CUDA only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`the_baked_attestation_reproduces_from_the_tree` required every gb10/nvfp4
target in the tree to be attested, which only an all-models build does. A
one-model build (`ATLAS_TARGET_MODEL=<model>`, as product images build)
attests that model's targets, so the test failed there and images skipped
it.
build.rs now bakes the targets it resolved (`ATLAS_TARGETS_RESOLVED`) and the
model spec it resolved them from (`ATLAS_TARGET_MODEL_SPEC`), exposed as
`atlas_kernels::TARGETS_RESOLVED` and `TARGET_MODEL_SPEC`. The test expects
the whole tree when the spec is `*`, as before, and the resolved targets
otherwise; a new test checks every attested target was resolved.
Checked on a GB10 with real single-target kernel builds: with
`ATLAS_TARGET_MODEL=glm-5.3-flash` all four tests pass ("1 target(s)
reproduced from the tree"). With `ATLAS_TARGET_MODEL=inkling-2-mini` the
resolved-target check passes and the hash check fails: a target with
`kernel_source` hashes the source target's kernels in build.rs but not in
`taxon::sources` / `taxon::configs`, a separate resolver drift.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the build does A target with `[model] kernel_source` (inkling-2-mini -> laguna-s-2.1, qwen3.8-27b -> qwen3.6-27b) or `[build] base_quant` compiles more than `common/` and its own quant dir, but `taxon::sources` resolved only those two, so the gate's hash never matched the one baked at build time and its records could never be excused. On the config side, build.rs hashed the source target's MODEL.toml and left out the target-local KERNEL.toml. - taxon: `layers()` mirrors resolve_targets (base_quant sibling, the kernel source's quant dir, the target's own quant dir as an overlay); `sources()` and `configs()` use it, `walk()` takes a redirected target's quants from its source, and `affected()` counts a change to the source model against the targets that compile it. An unparseable MODEL.toml or KERNEL.toml fails closed (None / affected). - build.rs: the attestation hashes the target's own MODEL.toml and every layer's KERNEL.toml, the files resolve_targets reads, in the order `taxon::configs` lists them. Checked on a GB10 with real kernel builds: one-model builds of inkling-2-mini, qwen3.8-27b and glm-5.3-flash each reproduce their target from the tree, and an all-models build reproduces all 31 gb10/nvfp4 targets (4 of 4 closure_attestation tests in each). 40 taxon unit tests pass, 6 of them new. Co-Authored-By: Claude Opus 5.5 <[email protected]>
qwen3.8-27b compiles qwen3.6-27b's kernels (`[model] kernel_source`), so a change to them now reopens both targets and two PRs on them collide on both. The tests asserted the old resolver's single target. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… targets as the build does
…ight upload, tokenizer under the weight read (Qwen3.8-27B 9.1–11.1 s → 7.3–8.1 s on one DGX Spark)
This was referenced Nov 25, 2026
Contributor
Author
GB10 gate of train 2 at
|
| check | result |
|---|---|
closure_attestation on one-model builds (#419/#420) |
inkling-2-mini 4/4 pass, qwen3.8-27b 4/4 pass (both use kernel_source). This was the one failure in #421's suite |
fmt, clippy -D warnings, full --no-fail-fast suite (6 crates) |
clean · 6,829 passed, 0 failed |
| Inkling strict greedy C1 / C8 vs #421's run | 8/8 / 8/8 identical |
| Qwen3.8-27B lp_dump vs #421's head (26,912 tokens) | max|Δ| 0.0000, greedy same |
| Qwen3.8-27B greedy C1 / C8 | 8/8 / 8/8 identical |
| KV pool | 28,102 → 28,066 blocks (boot noise, ±650 measured on 11-21) |
Cold start (#398): Qwen3.8-27B QAD exact profile, page cache dropped, /health polled at 0.1 s |
#421 head 14.28 / 13.95 / 13.42 / 13.52 s, mean 13.79 → train 2 12.33 / 11.94 / 12.26 / 12.48 s, mean 12.25 (−1.54 s, −11.2%) |
| ERROR / panic lines | 0 |
The cold-start gain matches the 11-21 measurement on main (−1.5 s). #398's HIP side was checked then too (framework 466). Its only change since is a comment-only commit.
Merge order: after #421. I'll retarget this to main once #421 is in.
sparky nightq 189 · binaries in sparky:~/code/wt-train2-1125 · 2026-11-25
🤖 Generated with Claude Code
This was referenced Nov 25, 2026
…docs (#420) `[`layers`]` is an intra-doc link from public docs to a private fn, which the docs job (#[deny(warnings)], rustdoc::private_intra_doc_links) rejects: 'public documentation for `sources` links to private item `layers`'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Retargeted to
🤖 Generated with Claude Code |
Three tests in this file run on parallel threads; each creates
atlas-fwp-{pid}-{nanos} and removes it at the end. Two that read the same
clock value shared a dir, and one removed it under the other:
fast_loader_with_direct_io_if_supported failed 'No such file or directory'
opening its model.safetensors on a CI runner (run 45655368561), after the
same code passed the run before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AzeezIsh
marked this pull request as ready for review
November 25, 2026 17:15
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.
Second GB10 train, stacked on #421 (base
integ/train-inkling-20261125). Each PR is merged--no-ff:kernel_source/base_quanttargets as the build does (stacked on #419)#398 was verified on 11-21 (sparky 150b/151b, framework 466). Since then its only change is a comment-only commit (
24094e9a9).Gate (sparky job 189, queued behind #421's jobs)
closure_attestationmust pass on one-modelinkling-2-miniandqwen3.8-27bbuilds. Both targets usekernel_source. This test is the one failure in Train 2026-11-25: Inkling 2 stack (#414-#418, #408), DFlash2 tree lattice (#369), Inkling AMD (#412, #413) #421's suite.-D warnings, the full--no-fail-fastsuite.Retarget to
mainonce #421 merges.🤖 Generated with Claude Code