Files
Strata/include/strata/kernels/cpu
Niko1221 716ebae14e engine: run on the graphics card's NUMA node on two-node machines
On a machine with two or more memory nodes the engine now restricts
itself, at start-up and before the CPU pool, the host thread and the
helper threads exist, to the CPUs of the node the graphics card is
attached to. A start with nothing pinned then ends with the same thread
masks, pool start-up line and worker count as the same engine started
under taskset on that node (checked on a rented two-socket host with an
RTX 4090; card_node_test checks the decision on made-up machines and the
restriction of a live process).

Measured value: decode with CPU experts on a two-socket host: a
32-worker pool on one node read 1.11-1.18 of the two-node default over
three rounds (UD 4-bit set, RTX 5090 host).

The process is left as it is unless all of these hold: Linux, two or
more nodes with CPUs, the process's CPUs span more than one node (a
taskset, numactl or cpuset restriction is kept), every card the run uses
reports the same known node (sysfs numa_node), the process may allocate
on that node and the node has free memory for the pinned K/V copy and
staging buffers, the threads were not placed by hand (--pool-cores,
STRATA_NUMA_SPLIT, an --aux-cpus list), the CPU is not hybrid, and the
pool keeps its worker count on that node alone (with --pool-workers N:
the node has N + 1 physical cores). A container CPU quota bounds both
counts alike, so the quota's worker count is kept.

STRATA_NUMA_CARD=0 turns it off. One-node machines read the sysfs node
folder and nothing else; there the output is identical to
STRATA_NUMA_CARD=0 (first-token logits, expert-stream counts and
tokens). With STRATA_TRACE set the engine prints one line,
"strata trace: card node: ...", with the inputs and the decision. The
expert arena itself is not placed by this change.
2026-11-14 05:51:17 +01:00
..