mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #611] [CLOSED] cpu: group ARM capacities and honor the pool's reserved host core #2721
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#2721
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/611
Author: @Suoriks
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:fix/gb10-cpu-affinity📝 Commits (10+)
b0dda4bAMD: gfx1101 (RX 7800 XT, #254 by jhohertz) and gfx1200 (RX 9060 XT, #256 by Efeisot) as community-validated cardscc97fcdsetup: AMD layer splits with --gpus (every chosen card a supported AMD arch; the engine compiled for each)e9e2ba3pinned (#243 follow-up): the shared-memory-budget cap on the sliced pin is opt-in (STRATA_ARENA_PIN_GIB=auto) - by default the arena pins as in 0.1.30; on this 64 GB PC the cap pinned 26 instead of 30 GiB and cost ~20% prompt speed and 2-4% IQ3_S decodecacffa9CS-T speed: the file tier fetched in parallel, PCIe planning without file reads, a partial pin of the RAM tier, bit-exact AVX2 multi-token kernels for Q4_K / Q5_1 / Q8_0 experts, decode-only tier statsa348c7aMerge branch 'f-131-srv' into r131-q4b93a00cMerge branch 'f-q4-on242' into r131-q48f5148cCS-T: the partial pin at most 24 GiB (STRATA_PARTIAL_PIN_GIB), the Q4_K/Q5_1/Q8_0 multi-token kernels from two tokens on5ffda19CS-T: the GGUF-in-place prefetch asks Windows for all of a layer's missed slices at once (PrefetchVirtualMemory)ed6c124#253: the 8 GiB arena pin cap only under WDDM; STRATA_ARENA_PIN_GIB; the split's prompt chunk steps down450149d--split-skip-if-fits (opt-in): an auto split runs on the main card alone when it holds every profiled expert + KV📊 Changes
10 files changed (+334 additions, -92 deletions)
View changed files
📝
CMakeLists.txt(+12 -0)📝
include/strata/core/session.hpp(+2 -1)➕
include/strata/kernels/cpu/cpu_topology.hpp(+39 -0)📝
include/strata/kernels/cpu/pool.hpp(+3 -19)📝
src/core/session.cpp(+10 -11)➕
src/kernels/cpu/cpu_topology.cpp(+75 -0)📝
src/kernels/cpu/pool.cpp(+8 -60)📝
src/program/generate.cpp(+1 -1)➕
tests/core/cpu_topology_test.cpp(+105 -0)➕
tests/core/session_host_affinity_test.cpp(+79 -0)📄 Description
On DGX Spark, Linux reports X925 CPU capacities of 997, 1017 and 1024, and A725 capacities of 718 and 731. Selecting only CPUs whose capacity equals the maximum counts one performance core instead of ten. The session also reselects its host CPU using the default
Allpolicy, even when the expert pool reserved a different CPU underautoorp-cores.This change groups ARM capacities into two classes when their spread is at least 10%, using the midpoint as the boundary. Smaller variations or incomplete capacity data keep physical-core order. The existing x86 capacity classification and Windows topology discovery are retained. Linux layout selection is separated from sysfs reads so recorded topologies can be tested without matching hardware.
ExpertPool::host_core()exposes the CPU already reserved by the pool.generatepasses it toSessionLoopScratch::init, which pins the host there and restores affinity at teardown. Existing two-argument callers retain the default host selection.Validation:
/O2 /DNDEBUG /W4 /WX:cpu_topology_testpassed. Fixtures cover recorded GB10 capacities, all three policies, restricted allowed CPUs, homogeneous capacity variation, missing capacity, SMT ordering, empty sets and the existing x86 classification.sm_121: the engine built in an isolated checkout with the previously validated local ARM port applied.ctest -R '^(cpu_topology_test|session_host_affinity_test)$' -Vpassed both tests. The session test used actual CUDA staging/event allocation and OS affinity queries:allreserved CPU 0;autoandp-coresreserved CPU 5 (X925). Each run restored the original affinity; the legacy init call also passed.The ARM build support is covered by #409; this PR contains the topology and host-placement fixes. The two-class ARM heuristic has hardware coverage on GB10 only. Full x86 engine execution was not tested. No throughput improvement is claimed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.