[PR #629] [CLOSED] ds4: opt-in vector helper input reads (2.8–4.2× faster copies) #636

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

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/629
Author: @LostVector
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: experiment/p2p-helper-exchange-20261028


📝 Commits (2)

  • 1bdf5ad Prototype optional vector helper activation loads with operator evidence
  • 558a77c Record exact helper-input model checks and bounded decode observations

📊 Changes

10 files changed (+1207 additions, -6 deletions)

View changed files

📝 CMakeLists.txt (+4 -0)
➕ bench/experiments/ds4_helper_input_20261028.json (+519 -0)
➕ bench/experiments/ds4_helper_input_20261028.md (+19 -0)
➕ bench/experiments/ds4_helper_input_runtime_20261028.json (+517 -0)
➕ bench/experiments/ds4_helper_input_runtime_20261028.md (+15 -0)
📝 docs/SETTINGS.md (+1 -0)
📝 src/ds4/ds4_kernels.cu (+13 -4)
📝 src/ds4/ds4_kernels.cuh (+3 -1)
📝 src/ds4/ds4_model.cu (+3 -1)
➕ tests/ds4_helper_input_probe.cu (+113 -0)

📄 Description

The helper GPU's activation-copy stage got 2.8–4.2× faster by reading four floats at a time from the existing host mailbox. A bounded MTP model screen observed only +0.31% coding, +0.15% async and +0.24% long-context decode throughput. Those small model observations are comparable to some control drift; this is not a general decode-speedup claim.

MAYA_DS4_HELPER_INPUT_VEC=1 opts into aligned float4 reads using the existing fresh-load helper. Other widths/alignments keep scalar reads. Default is off. It adds no VRAM or new transfer protocol, and preserves route metadata, acknowledgement, expert math, CPU/helper addition order and fallback.

Fixture Scalar tok/s Vector tok/s Pooled gain Scalar tail drift
code 39.710 39.832 +0.31% +0.36%
async_workers 36.428 36.481 +0.15% +0.92%
long 29.001 29.070 +0.24% +0.08%

Validation:

  • 31,027,200 full-vocabulary values exact in scalar/vector/scalar replay with matched state/residency, plus 1,551,360 saved canonical-reference values exact across three fixtures.
  • All 21 timed requests clean under observed KFD/PSI counters; tokens, accepted/offered drafts, cache counts and helper work matched. Seven of nine pairs were positive. Three blocks in one load do not establish an independent-load confidence interval.
  • Standalone probe: 3,360 dynamic checks and 12,288 timed transfers on both primary→helper links, including odd dimensions, separately misaligned source/destination, special payload bits, metadata, guards and slot reuse. The ready-copy diagnostic fell from about 39→14 us at one row and 204→57 us at six rows; direct peer reads were slower and are not part of the serving change.
  • Current-main Release HIP production build passed. The optional CMake ds4_helper_input_probe target built and passed another 1,512 dynamic checks.

Scope: model tests are a private backport onto the optimized serving snapshot, not a fresh model run of this public current-base engine. They use fixed startup placements, TP2 on two R9700s, helper/DSpark on a third, MTP 5/confidence 0.65 and CPU 8. Private switches drain helper jobs and stream before changing mode. No extra allocation/cache-capacity tradeoff. Original serving was independently restored and remains unchanged.

Remaining validation includes current-base model startup/performance, normal adaptive-cache serving, temperature 1/sampled drafting and CUDA/other hardware. No extended replay or default promotion is proposed solely from this small screen. bench/experiments/ds4_helper_input_runtime_20261028.{md,json} includes individual blocks, request fingerprints, work counts and limitations; the operator checkpoint remains separate.


🔄 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/629 **Author:** [@LostVector](https://github.com/LostVector) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `experiment/p2p-helper-exchange-20261028` --- ### 📝 Commits (2) - [`1bdf5ad`](https://github.com/mw00/project-maya/commit/1bdf5ad2eaf5f90e61c3e408a858ab5650eefc52) Prototype optional vector helper activation loads with operator evidence - [`558a77c`](https://github.com/mw00/project-maya/commit/558a77c1db43d9be5bf3c269d56ab5c5e33861a7) Record exact helper-input model checks and bounded decode observations ### 📊 Changes **10 files changed** (+1207 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+4 -0) ➕ `bench/experiments/ds4_helper_input_20261028.json` (+519 -0) ➕ `bench/experiments/ds4_helper_input_20261028.md` (+19 -0) ➕ `bench/experiments/ds4_helper_input_runtime_20261028.json` (+517 -0) ➕ `bench/experiments/ds4_helper_input_runtime_20261028.md` (+15 -0) 📝 `docs/SETTINGS.md` (+1 -0) 📝 `src/ds4/ds4_kernels.cu` (+13 -4) 📝 `src/ds4/ds4_kernels.cuh` (+3 -1) 📝 `src/ds4/ds4_model.cu` (+3 -1) ➕ `tests/ds4_helper_input_probe.cu` (+113 -0) </details> ### 📄 Description The helper GPU's activation-copy stage got **2.8–4.2× faster** by reading four floats at a time from the existing host mailbox. A bounded MTP model screen observed only **+0.31% coding, +0.15% async and +0.24% long-context decode throughput**. Those small model observations are comparable to some control drift; this is not a general decode-speedup claim. `MAYA_DS4_HELPER_INPUT_VEC=1` opts into aligned float4 reads using the existing fresh-load helper. Other widths/alignments keep scalar reads. Default is off. It adds no VRAM or new transfer protocol, and preserves route metadata, acknowledgement, expert math, CPU/helper addition order and fallback. | Fixture | Scalar tok/s | Vector tok/s | Pooled gain | Scalar tail drift | |---|---:|---:|---:|---:| | code | 39.710 | 39.832 | +0.31% | +0.36% | | async_workers | 36.428 | 36.481 | +0.15% | +0.92% | | long | 29.001 | 29.070 | +0.24% | +0.08% | Validation: - **31,027,200 full-vocabulary values exact** in scalar/vector/scalar replay with matched state/residency, plus **1,551,360 saved canonical-reference values exact** across three fixtures. - All 21 timed requests clean under observed KFD/PSI counters; tokens, accepted/offered drafts, cache counts and helper work matched. Seven of nine pairs were positive. Three blocks in one load do not establish an independent-load confidence interval. - Standalone probe: 3,360 dynamic checks and 12,288 timed transfers on both primary→helper links, including odd dimensions, separately misaligned source/destination, special payload bits, metadata, guards and slot reuse. The ready-copy diagnostic fell from about 39→14 us at one row and 204→57 us at six rows; direct peer reads were slower and are not part of the serving change. - Current-main Release HIP production build passed. The optional CMake `ds4_helper_input_probe` target built and passed another 1,512 dynamic checks. Scope: model tests are a **private backport onto the optimized serving snapshot**, not a fresh model run of this public current-base engine. They use fixed startup placements, TP2 on two R9700s, helper/DSpark on a third, MTP 5/confidence 0.65 and CPU 8. Private switches drain helper jobs and stream before changing mode. No extra allocation/cache-capacity tradeoff. Original serving was independently restored and remains unchanged. Remaining validation includes current-base model startup/performance, normal adaptive-cache serving, temperature 1/sampled drafting and CUDA/other hardware. No extended replay or default promotion is proposed solely from this small screen. `bench/experiments/ds4_helper_input_runtime_20261028.{md,json}` includes individual blocks, request fingerprints, work counts and limitations; the operator checkpoint remains separate. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:27:43 +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#636
No description provided.