[PR #110] [MERGED] A split's RAM tiers pinned one after another near a pinning cap, the start's uploads through pinned memory (#105); where a Windows engine runs (#56) #345

Closed
opened 2026-10-29 21:24:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/110
Author: @mw00
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @mw00

Base: main ← Head: tier-pin-order


📝 Commits (4)

  • 5eaa949 A split's RAM tiers pinned one part after another, room left under a pinning cap, the start's uploads through pinned memory, the CPU lane's middle timing round (#105)
  • e301594 Windows with two NUMA nodes or more: the processor group and node the engine runs in, and the nodes of the RAM tier's pages, said at start (#56)
  • 9c3e1f8 glm fast: the split loader's comment on when the parts pin
  • 50628fb glm fast: the CPU lane's timing keeps the fastest round - the middle one planned a 2x V100 split's first lane one expert less, and decode 5-10% slower

📊 Changes

4 files changed (+112 additions, -11 deletions)

View changed files

📝 include/strata/core/glm_model.hpp (+17 -4)
📝 src/core/glm_fast_path.cu (+92 -6)
📝 src/core/glm_fast_state.hpp (+1 -0)
📝 src/core/glm_model.cu (+2 -1)

📄 Description

Fixes for #105 (v1.0.33 decodes ~25% slower than v1.0.32 on a Windows 2x RTX 3080 split) and a start line for #56.

#105: the RAM tiers near a pinning cap

With STRATA_GLM_RAM_GB=44 the two GPUs plan 21.5 + 22.5 GB in both versions. The reporter's logs show what pinned:

CUDA0 CUDA1 total
v1.0.32 21.48 GB 21.12 GB 42.6 GB
v1.0.33 13.11 GB 22.51 GB 35.6 GB
v1.0.33, RAM_GB=47 22.95 GB 20.38 GB 43.3 GB, then "the warmed expert tables did not upload"

That PC pins ~43 GB at most. Since #80 the parts pin at the same time, and since #99 a refused tier steps down in small steps. Near the cap, the first part kept being refused while the second was still pinning.

  • The parts pin one after another, in part order: a second turn (wait_pin / pass_pin) in the split loader's SplitLoad. Only the part that reaches the cap gives way. A part that stops early passes its turn, as the plan turn already did.
  • Room under the cap: a tier that pins checks that 512 MB more would pin too, and takes a step less (1/32) when it would not. A pageable copy needs pinned buffers of the driver's own.
  • The start's uploads go through pinned memory: the warmed expert tables and the CPU lane's route counts are copied through the disk staging (pinned before the tier since #99) instead of from pageable memory. The table error now names the CUDA error.

The CPU lane's timing is unchanged. We tried the middle of its five rounds instead of the fastest. On 2x V100 it timed the first lane 0.85 ms an expert against 0.74, planned it one RAM-tier expert less, doubled the PCIe fetches, and decoded 5-10% slower in interleaved runs. The comment now says so.

#56: where a Windows engine runs

On Windows with two NUMA nodes or more, each GPU says at start which processor group and node the engine runs in, and the nodes of 256 sampled RAM-tier pages:

glm fast: CUDA0 Windows NUMA: 2 nodes, 2 processor groups; the engine runs in group 1 (node 1); the RAM tier's pages, a sample of 256: node 0: 256, node 1: 0

On a PC with more than 64 logical CPUs, Windows runs each process in one processor group, a socket's CPUs. The bimodal CPU-lane cost in #56 (0.85 against 0.71 ms an expert, start by start) looks like the engine landing on the socket away from the tier. This line is to confirm that before changing placement.

Tested

  • 2x V100 (Mercury), Maya-M-Derisked, against v1.0.33:
    • the greedy tokens with the CPU lane off are identical, also with STRATA_GLM_PARALLEL_LOAD=0 and with a pool cap;
    • a conversation's turns and seven sampled runs are identical;
    • the same tier sizes (Linux has no pinning cap), now pinned in part order, and the same start time;
    • decode with the CPU lane on, interleaved; the server end to end; the GLM parity tests.
  • 1x V100 (Uranus), Maya-S v2: the greedy tokens with the CPU lane off are identical, and decode is the same (18.1 / 18.1 against 18.1 / 18.2 tok/s).
  • Windows: the engine compiles with MSVC and CUDA 12.x.
  • tools/check_hip_compat.py passes.

The Windows pinning cap can't be reproduced on Linux. The reporter's re-run on the 2x RTX 3080 box is the real test.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/110 **Author:** [@mw00](https://github.com/mw00) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `tier-pin-order` --- ### 📝 Commits (4) - [`5eaa949`](https://github.com/mw00/project-maya/commit/5eaa949a7a84c9b66a7138b4f7d81429c97c2d76) A split's RAM tiers pinned one part after another, room left under a pinning cap, the start's uploads through pinned memory, the CPU lane's middle timing round (#105) - [`e301594`](https://github.com/mw00/project-maya/commit/e301594233feaae4c2f5ba8ad81fc5b829186fe1) Windows with two NUMA nodes or more: the processor group and node the engine runs in, and the nodes of the RAM tier's pages, said at start (#56) - [`9c3e1f8`](https://github.com/mw00/project-maya/commit/9c3e1f86bd17c85e2c0969a9796c6ef5af1dbfa2) glm fast: the split loader's comment on when the parts pin - [`50628fb`](https://github.com/mw00/project-maya/commit/50628fb3d1929c50cb655d773a712d221b6d453f) glm fast: the CPU lane's timing keeps the fastest round - the middle one planned a 2x V100 split's first lane one expert less, and decode 5-10% slower ### 📊 Changes **4 files changed** (+112 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `include/strata/core/glm_model.hpp` (+17 -4) 📝 `src/core/glm_fast_path.cu` (+92 -6) 📝 `src/core/glm_fast_state.hpp` (+1 -0) 📝 `src/core/glm_model.cu` (+2 -1) </details> ### 📄 Description Fixes for #105 (v1.0.33 decodes ~25% slower than v1.0.32 on a Windows 2x RTX 3080 split) and a start line for #56. ## #105: the RAM tiers near a pinning cap With `STRATA_GLM_RAM_GB=44` the two GPUs plan 21.5 + 22.5 GB in both versions. The reporter's logs show what pinned: | | CUDA0 | CUDA1 | total | | --- | ---: | ---: | ---: | | v1.0.32 | 21.48 GB | 21.12 GB | 42.6 GB | | v1.0.33 | 13.11 GB | 22.51 GB | 35.6 GB | | v1.0.33, `RAM_GB=47` | 22.95 GB | 20.38 GB | 43.3 GB, then "the warmed expert tables did not upload" | That PC pins ~43 GB at most. Since #80 the parts pin at the same time, and since #99 a refused tier steps down in small steps. Near the cap, the first part kept being refused while the second was still pinning. - **The parts pin one after another**, in part order: a second turn (`wait_pin` / `pass_pin`) in the split loader's `SplitLoad`. Only the part that reaches the cap gives way. A part that stops early passes its turn, as the plan turn already did. - **Room under the cap:** a tier that pins checks that 512 MB more would pin too, and takes a step less (1/32) when it would not. A pageable copy needs pinned buffers of the driver's own. - **The start's uploads go through pinned memory:** the warmed expert tables and the CPU lane's route counts are copied through the disk staging (pinned before the tier since #99) instead of from pageable memory. The table error now names the CUDA error. The CPU lane's timing is unchanged. We tried the middle of its five rounds instead of the fastest. On 2x V100 it timed the first lane 0.85 ms an expert against 0.74, planned it one RAM-tier expert less, doubled the PCIe fetches, and decoded 5-10% slower in interleaved runs. The comment now says so. ## #56: where a Windows engine runs On Windows with two NUMA nodes or more, each GPU says at start which processor group and node the engine runs in, and the nodes of 256 sampled RAM-tier pages: ``` glm fast: CUDA0 Windows NUMA: 2 nodes, 2 processor groups; the engine runs in group 1 (node 1); the RAM tier's pages, a sample of 256: node 0: 256, node 1: 0 ``` On a PC with more than 64 logical CPUs, Windows runs each process in one processor group, a socket's CPUs. The bimodal CPU-lane cost in #56 (0.85 against 0.71 ms an expert, start by start) looks like the engine landing on the socket away from the tier. This line is to confirm that before changing placement. ## Tested - **2x V100 (Mercury), Maya-M-Derisked**, against v1.0.33: - the greedy tokens with the CPU lane off are identical, also with `STRATA_GLM_PARALLEL_LOAD=0` and with a pool cap; - a conversation's turns and seven sampled runs are identical; - the same tier sizes (Linux has no pinning cap), now pinned in part order, and the same start time; - decode with the CPU lane on, interleaved; the server end to end; the GLM parity tests. - **1x V100 (Uranus), Maya-S v2:** the greedy tokens with the CPU lane off are identical, and decode is the same (18.1 / 18.1 against 18.1 / 18.2 tok/s). - **Windows:** the engine compiles with MSVC and CUDA 12.x. - `tools/check_hip_compat.py` passes. The Windows pinning cap can't be reproduced on Linux. The reporter's re-run on the 2x RTX 3080 box is the real test. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:24:28 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#345
No description provided.