mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2242] [Engine] numa-placement: --numa-hot-node N - keep the GPU-side host pools on the GPU's NUMA node (Linux, dual-socket, opt-in) #3943
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#3943
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/2242
Author: @G0-0000
Created: 10/13/2026
Status: 🔄 Open
Base:
main← Head:feat/numa-placement📝 Commits (9)
156cf52numa: --numa-hot-node N claims the RAM complement on the GPU's node before the startup fill117b7abnuma: lift the NUMA primitives out of expert_source.cpp into numa_policy.hppa49949anuma: publish the hot and cold node process-wide, cold derived from hotf7d1c56numa: place the layer, session, weight and native-head pinned pools on the hot nodee33655dnuma: place a conversation buffer's segments on the cold node6a01c56docs: how to find the GPU's NUMA node for --numa-hot-node5b4dce4numa: judge the claim by the node's own free memory, and its id by the host's node list8017e50resident: fix budget clamp double-counting the pre-claimed arenacc9cd6eresident: test the arena credit in the budget clamp, and saturate it📊 Changes
14 files changed (+859 additions, -57 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📝
docs/AI_SETUP.md(+1 -0)📝
docs/DETAILS.md(+18 -0)📝
include/strata/core/conversation_buffer.hpp(+14 -0)📝
include/strata/core/expert_source.hpp(+45 -0)➕
include/strata/core/numa_policy.hpp(+118 -0)📝
src/core/expert_source.cpp(+320 -34)📝
src/core/layer.cpp(+21 -9)📝
src/core/native_head.cpp(+14 -1)➕
src/core/numa_policy.cpp(+27 -0)📝
src/core/session.cpp(+17 -5)📝
src/core/weights.cpp(+17 -6)📝
src/program/generate.cpp(+75 -1)📝
tests/core/file_expert_source_test.cpp(+171 -0)📄 Description
What this is
An opt-in placement for the expert RAM complement:
--numa-hot-node Nclaims the complement on the NUMA node that holds the GPU before the startup fill, so a dual-socket box does not spill part of it to the other socket.--numa-cold-nodeplaces the session and conversation buffers on the other node.Rebased onto 0.2.2 on 2026-10-22, and now includes the budget-clamp fix from #2501 (closed with the 0.2.0-beta tracker reset) plus its regression tests. That fix belongs to this path: without it the clamp counts the pre-claimed arena twice.
Why
On the measured box (dual-socket, 125 GiB as two ~63 GiB nodes, Tesla V100-SXM2-32GB, engine bound to node1 with the GPU), the complement used to land 80.6 % on node1 and the rest on node0; the claim takes it to 100 %, and after the startup fill the file tier reads nothing from disk. This is a placement change, not a speed claim: decode and prompt numbers stayed inside the run-to-run spread.
Relation to #3201 / STRATA_NUMA_POOL
#3201 splits the CPU expert pool per NUMA node and places each socket's half of every expert's rows locally. This PR is the other axis: it keeps the whole complement on the GPU's node. They are complementary but should not be combined blindly: when the hot-node claim wins, the split's complement placement does not run, and this branch now prints one line saying so. Our deployment runs
STRATA_NUMA_POOL=0.Validation
Passed: CUDA 12.9 (sm_70) full build;
file_expert_source_test, including the clamp regression and the node accessors;numa_pool_testunchanged;--numa-hot-node fooexits 2 with the usage line.Not run: an end-to-end run of this rebased branch on the dual-socket box (the production service holds the GPU), and Windows/HIP/SYCL builds.
Defaults
No flag: upstream behaviour and the same startup output. Non-Linux degrades with a per-site warning.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
STRATA_PATTN_SM60=1) #4844