mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1166] [CLOSED] cpu pool: --host-core sibling, the host off the interrupts' logical processor (hybrid CPUs too) #3279
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#3279
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/1166
Author: @Hardin22
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:pr41/host-sibling📝 Commits (1)
a71da89cpu pool: --host-core sibling, the host on the first core's other hardware thread (hybrid CPUs too)📊 Changes
6 files changed (+77 additions, -13 deletions)
View changed files
📝
docs/DETAILS.md(+5 -1)📝
include/strata/kernels/cpu/pool.hpp(+10 -6)📝
src/core/session.cpp(+2 -1)📝
src/kernels/cpu/pool.cpp(+24 -0)📝
src/kernels/cpu/pool_affinity_test.cpp(+25 -0)📝
src/program/generate.cpp(+11 -5)📄 Description
--host-core lastexists because Windows sends a GPU's interrupts to the first logical processor, where the host thread spins on the GPU's flags. It leaves hybrid CPUs alone, though, so on a 12th-14th gen Intel or a Core Ultra the host stays on logical processor 0 together with the interrupts.This adds
--host-core sibling(orSTRATA_HOST_CORE=sibling). The host stays on the first core but moves to its other hardware thread:--pool-affinity auto/p-cores, which also use the P-cores' siblings, the host's sibling is taken out of their list;firstwhen the core has no SMT sibling;It is opt-in, so nothing changes by default. The startup log names the placement, e.g.
the host thread on 1 (draining too) (--host-core sibling).Measured
RTX 4060 Ti (stage 0, layers 0-19, on PCIe 4.0 x4) + RTX 5080 (stage 1), i9-14900KF (8P+16E, hybrid), Windows 11. Swift 1.5 IQ3_XXS at 160K (q4_0 KV), resident RAM mode with the whole complement in RAM, stock draft layer,
--trim-stage-weights. Greedy, five prompts × two rounds, a fresh server per run, the two arms interleaved, decode tok/s:first(today)sibling--pipeline-windows 2--pipeline-windows 2 --adapt-async 1The first row is about +2.4%. The second is +7% on average (104.3 → 111.9), and the spread goes from 14 tok/s to 0.8. That is where it matters most: there the host also queues the async tier's copies, and with the host on logical processor 0 a whole run would sometimes come out 10-15% slower, while the GPU clocks, P-states, acceptance and cache hits were the same. In the decode timing log, the slow runs had the same per-layer host time but more "GPU-reach wait". With
siblingthose drops went away: an earlier set of four pairs on the same stack, with some opt-in pipeline switches on, gave 105.5 ± 6 with the host on logical processor 0 and 114.2 ± 0.4 on its sibling.The build for the second row also carried other branches' opt-in switches, all off, and a Windows power-throttling opt-out in both arms, which made no difference on its own.
Checks
pool_affinity_test(Windows) gains a layout check for every affinity mode (all,auto,p-cores): withsibling, the host is on the first host core's sibling, no worker is on that core, and without SMT the layout is the same asfirst. It passes on the 14900KF. The Linux test is unchanged, and the Linux path (sibling_offrom sysfs) was neither built nor run here.If it holds on other hybrid boxes, it may be worth making it the default for hybrid CPUs on Windows. I left that to you.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.