mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5379] [Engine] Session-file identity gaps on multi-GPU hosts: device set / compute capability, STRATA_HC_Q8, STRATA_ROUTE_TAIL_SKIP #3208
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3208
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nazerim on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5379
Static analysis, read at v0.2.10
ffa80d73and re-verified against currentmain9f7d977d(no commit in between touchesconversation_file.*— the seam is unchanged). Not yet an empirical repro — happy to produce one, see "test" below. Three inputs that change computed state are outside the session-file identity, so a file can pass every check and restore state that was computed by different arithmetic than this runtime would now produce.1. The fingerprint binds neither the GPU device set nor compute capability per stage
SessionConfig(include/strata/core/conversation_file.hpp:71–84) carries engine version, backend, kv, max_context, kv_resident, mtp_window, kv_rot, rope, cvec + 24 arithmetic switches (identity-hash block:generate.cpp:11835–11837, "the config fingerprint covers the RESOLVED settings … the K/V format and the arithmetic switches") — but not which GPUs exist, their order, or their architecture.--layer-splititself is likewise outsideSessionConfig(the PRs adding v2 stage tables bind geometry, which is adjacent but different: the geometry check proves the K/V shape, not whose kernel produced it).Why that matters: CUDA kernel selection is per-device from compute capability —
src/core/verify.cpp:262–280picks the side-mixer arithmetic viasm120_default(maj, min)cached inper_dev[64]. Two unlike cards (e.g. sm_86 + sm_120) genuinely compute different bit patterns for the same layer. A saved session whose stage-0 K/V was produced by the sm_86 path restores cleanly onto a runtime where that layer range now sits on the sm_120 device (swap the physical cards, change the split, or use the server's per-boot GPU ordering —ordered_gpusdeliberately does not bind ordinals,serve/server.py:4092), and every geometry/identity check passes. (The SHAPE half of that check is real — verified on our rig: files written with--layer-split 13pinned are refused by a K=12 boot with "saved with another layer range than this runtime's", fail-closed. It is the per-stage ARCH dimension that has nothing to compare — see "Proposed fix".)2.
STRATA_HC_Q8andSTRATA_ROUTE_TAIL_SKIPare not among the 24 hashed switchesNeither is among the hashed switches (the set covers
STRATA_KV_ROT, rope, and 22 others; both names appear nowhere in the identity block). They bite in different placements:STRATA_ROUTE_TAIL_SKIPis live on a split — it changes which experts a window's missed routing skips (expert_source.cpp:4849–4856reads it per window) — so a session saved with one rank and restored with another silently continues from differently-routed cells, on exactly the single-GPU-plus-split configurations where sessions exist.STRATA_HC_Q8is a state-changing weight representation (native_dense.cpp:51) but is gated to one GPU (!multi_gpuatgenerate.cpp:4952); it matters for the off-split case, which today's session files already support. (Watch naming:STRATA_HC_REQ8— the int8-requant path atgenerate.cpp:5101–5104— is a different switch; don't let the catalog confuse the reader.)Proposed fix
Extend
SessionConfig: (a) per-stage(device_count, compute-capability-of-each-device-with-layers, layer-range)— or simply a sorted list of (arch, layer_lo, layer_hi) triples once #4310-style stage tables exist; (b) add the two switches to the hashed 24 (they're already read from env at startup; hashing them is one line each). The lane already agrees on the principle in spirit: #3957's park manifest refuses to load across "another engine file or STRATA_* switch set" — the session-file fingerprint is the same seam, left open. Cost: every existing session file on the box invalidates once at next version bump — acceptable for a feature whose split-support is still pre-release, but worth a note in the docs ("files from before 0.1.xx are refused; save again").Test (if maintainers want it empirical, not just static): a 2-GPU unlike-arch host (sm_86 + sm_120): save at
--layer-split Kunder one card order, shut down, physically swap the cards (or boot with the server's reorder giving the opposite order), start, RESTORE → today it should be accepted (no device fields to compare); answers at the first turn should be checked greedy-vs-cold to see whether the silent arch-mismatch is benign in practice or drifts. On a P2P-less mixed pair with--kv-residentthe bulk K/V is host-pinned, which may hide the difference in some configs — which is exactly why a cheap identity field is the safer answer than an investigation.Related to: #4310 (stage-table geometry binding — this is the identity seam it doesn't close), #4551 (append inherits the same identity), #4226 (its disk tier binds
SessionConfigas-is and would inherit both gaps). Filed separately per "one problem per issue".@github-actions[bot] commented on GitHub (Nov 6, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Nov 6, 2026):
Thanks, this follows the format now.