mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1905] [CLOSED] arena: pin by need (STRATA_PIN_BY_NEED=1) and a PCIe share floor (STRATA_PCIE_MIN1=1), +5-7 % prompt read on Windows #3752
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#3752
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1905
Author: @RubenTorney
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:pr/pin-by-need📝 Commits (1)
5f271d4arena: pin by need (STRATA_PIN_BY_NEED, opt-in) + PCIe share floor (STRATA_PCIE_MIN1, opt-in)📊 Changes
16 files changed (+1052 additions, -16 deletions)
View changed files
➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/README.md(+42 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/bitexact.jsonl(+4 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/bitexact_fixed_cache.jsonl(+4 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/cold.jsonl(+72 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/cold_on_async.jsonl(+48 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/cold_on_async_pcie.jsonl(+84 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/context.jsonl(+24 -0)➕
bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/strata_ab2.py(+326 -0)📝
docs/DETAILS.md(+7 -0)📝
include/strata/core/expert_source.hpp(+32 -1)📝
include/strata/core/pinned.hpp(+26 -1)📝
include/strata/platform/memory.hpp(+7 -0)📝
src/core/expert_source.cpp(+127 -12)📝
src/core/pinned.cu(+111 -2)📝
src/platform/memory.cpp(+55 -0)📝
src/program/generate.cpp(+83 -0)📄 Description
Title
Issue: #1903
Summary
On Windows
cudaHostRegisterof the whole arena fails (WDDM shared budget, about half the RAM) and the sliced fallbackregisters the first ~30 GiB, layers 0-31 for Qwen3.8-Flash-Next IQ3_S: layers 32-47 never get a PCIe share, while ~10 GiB of the
registered prefix hold GPU-resident experts that DMA never reads. With
STRATA_PIN_BY_NEED=1the arena gives every blob apage-aligned stride (+0.15 % RAM) and registers the expert profile's non-GPU-resident experts by rank, up to
STRATA_ARENA_PIN_GIB(29 GiB by default on Windows, to leave the shared segment some room).STRATA_PCIE_MIN1=1sends onemiss over PCIe as soon as a layer has two (the share
(nmiss * pcie_num) >> 8rounds to 0 at 1-2 misses). Both opt-in.RTX 3090 + Ryzen 5 5600X: 28.96 GiB registered = 92 % of the non-resident experts, all 48 layers get a PCIe share.
Prompt read +5-7 % at 56K-117K tokens (2,172 → 2,313 and 2,091 → 2,208 tok/s). Decode: level on the blocking tier
(x0.999 cold, 6/12), x1.02-1.03 (10 of 12 prompts faster) on top of
--adapt-async 1(the other PR) with--pcie-frac 0.6.What changed
src/core/pinned.cu,include/strata/core/pinned.hpp: aPinnedArenaconstructor that registers a list of byte rangesin order before any page is touched, stops at the cap or the first refusal, and unregisters them in the destructor;
PadMap, the per-blob placement used by the loaders (load_experts_ranges,load_experts_gguf) when the layout is padded.STRATA_ARENA_PIN_GIB=autoapplies to this path too.src/platform/memory.cpp,.hpp:lock_resident_rangeskeeps the holes between the ranges resident (one working-set raise).src/core/expert_source.cpp,.hpp(ArenaExpertSource):arena_off()(one offset function forblob,blob_at,pinned,device_alias, the ranges);set_pin_priority;pinned()/device_alias()/pcie_layer()by ranges (a blob ispinned only if it lies wholly inside one registered range);
STRATA_PCIE_MIN1in the PCIe share.src/program/generate.cpp: before the arena is loaded, the profile's pairs past the estimated GPU-resident count (from--expert-cacheor the free VRAM, as the cache'sautocomputes it) are ranked into ranges; one log linepin by need: N ranges, X GiB pinned, Y % of the non-resident experts.docs/DETAILS.md,bench/results/2026-10-11-community-rtx3090-5600x-arena-pin-by-need/.How the default path was checked
STRATA_PIN_BY_NEEDthe layout, the loaders and the sliced pin are untouched. Bit-exact mode(
STRATA_IQ_MT_MIN=1 --pcie-frac 0 --adapt-every 0), greedy, 6 prompts: on the 5 prompts that v0.1.42 reproduces betweentwo of its own fresh engines, this branch without the variables gives the same answers byte for byte (sha256). The 6th
prompt differs between two runs of v0.1.42 itself in that mode on this machine.
pinned.cuandexpert_source.cppare shared with those builds (the new code is host code behind the variable).
Extra Notes
experts.binthrough the buffered loader (a contiguous unbuffered read cannot land strided); loadspeed was unchanged here (6.7 GiB/s).
STRATA_VERIFY_ARENA's checksum is over the padded layout when the variable is on (not comparable with the packed one).few hot ones, never correctness (
STRATA_PIN_BY_NEED_SKIP=Nsets it).🤖 Generated with Claude Code
https://claude.ai/code/session_015oFHMEgBzk7kQSqUVWoc67
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
STRATA_MMQ_WS=1, opt-in) #4767STRATA_PIPELINE_SNAP_RING=1) #4843STRATA_PATTN_SM60=1) #4844