mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #463] [CLOSED] ds4: DS4_COPY_NUMA up to 4 NUMA parts (a CPU-lane pool per socket of a 4-socket host) #541
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#541
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/mw00/project-maya/pull/463
Author: @geoffreybyers
Created: 10/24/2026
Status: ❌ Closed
Base:
main← Head:ds4-copy-numa-4📝 Commits (1)
39f57d0ds4: DS4_COPY_NUMA up to 4 NUMA parts (a CPU-lane pool per socket of a 4-socket host)📊 Changes
2 files changed (+12 additions, -7 deletions)
View changed files
📝
docs/SETTINGS.md(+1 -0)📝
src/ds4/ds4_model.cu(+11 -7)📄 Description
DeepSeek's CPU lane copies its RAM experts into at most 2 NUMA parts, with a worker pool per part. On a host with 3 or 4 sockets, the other sockets' cores and memory bandwidth go unused.
On a 4× Xeon E7-8880 v4 (88 cores), for example, the lane ran 44 threads on sockets 0–1, and that cap holds whatever
MAYA_DS4_CPU_LANEor--cpu-threadssay.The change
DS4_COPY_NUMA(set in the config's"env") now accepts1–4instead of1–2. Each part is a set of rows on its own node, with a worker pool there. Most of the code already loops overNH; only three places were fixed at two:ram_part(slot → its parts) and the copy'sbasearray are nowstd::array<uint8_t*, kMaxNH>(kMaxNH = 4), filled for every part.IoQueue::Job jobs[6](3 matrices × 2 parts) is nowjobs[3 * kMaxNH]. With 4 parts it overflowed the stack ("stack smashing detected") the first time a long prompt pulled copied experts into staging; short chats never reach that path.DS4_COPY_NUMAclamp:max(1, min(kMaxNH, n)).The default is unchanged (at most 2 parts). Nothing changes unless
DS4_COPY_NUMAis set to 3 or 4. There's a row for it indocs/SETTINGS.md.Measured
Setup:
f26d8ba.--mmap-experts off,DS4_ENGRAM_RAM=1,DS4_REQUIRE_ALL_RAM=1, undernumactl --interleave=all.Method:
DS4_COPY_NUMA=4, two runsDS4_COPY_NUMA=4DS4_COPY_NUMA=4The needle was found in every run.
Output: greedy answers differ between these runs in their last bits and words, but they differ between two stock runs as well. The parts split rows, not sums, so each row is computed in full by one node. The differences come from the per-token CPU/GPU choice, which follows measured timings.
Checks
tools/check_hip_compat.pypasses; no new CUDA calls.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.