[PR #3552] [Engine] skip file-tier experts while a helper GPU is attached #4687

Open
opened 2026-11-07 15:38:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3552
Author: @sakuumomo
Created: 10/21/2026
Status: 🔄 Open

Base: main ← Head: pr/engine-helper-tail-skip


📝 Commits (1)

  • ff5c463 Skip file-tier experts while a helper GPU is attached

📊 Changes

5 files changed (+30 additions, -5 deletions)

View changed files

📝 docs/DETAILS.md (+2 -1)
📝 docs/QUANTS.md (+2 -1)
📝 include/strata/core/expert_source.hpp (+5 -0)
📝 src/core/expert_source.cpp (+12 -1)
📝 src/program/generate.cpp (+9 -2)

📄 Description

Problem and result: The file-tier tail skip turned off whenever a helper GPU was attached. A file-tier miss is skipped again while a helper is attached. A row the helper holds, or a row whose bytes are already in the host copy, is still computed. With no helper, a missed tail is skipped even when those bytes are already in RAM. A peer GPU still turns the skip off. The startup line and docs/DETAILS.md say the same thing.

Related discussion: none for this helper case. The skip itself is the existing STRATA_ROUTE_TAIL_SKIP default.

Approach: The dispatch no longer treats remote_count > 0 as a reason to disable the skip. A helper still refuses the skip for a row it holds and for a row host_copy() reports as already in a host copy (a resident complement, or an arena that is not a demand-paged file mapping). Peer GPUs keep the old disable. The default rank is unchanged. The SYCL port compiles its own generate.cpp and expert_source.cpp, so this pull request does not change that backend.

Validation:
Passed: HIP and CUDA builds of 4c1f0dda on Linux x86-64, through Nix, with STRATA_BUILD_TESTS=OFF and STRATA_PORTABLE=ON.
HIP: STRATA_ENABLE_HIP=ON, STRATA_ENABLE_CUDA=OFF, CMAKE_HIP_ARCHITECTURES=gfx1030, STRATA_PREFILL_MMQ=ON, HIP 7.2.3. Output /nix/store/c6zp3p826fryl6x7cgp3lsw16z56him8-strata-hip-0.2.1 (strata and strata-device). The strata binary contains the gfx1030 name.
CUDA: STRATA_ENABLE_CUDA=ON, STRATA_ENABLE_HIP=OFF, STRATA_HYBRID left off, CMAKE_CUDA_ARCHITECTURES=89-real, STRATA_PREFILL_MMQ=OFF, CUDA 12.9.86, gcc 14.4.0. Output /nix/store/yr652vys91l94sj7dvxigsz6a2ynjgpy-strata-cuda-0.2.1 (strata and strata-device).
The author served on two Linux machines, each with a helper GPU, and reports that both function as intended. The desktop is an RX 6800 and an RX 6900 XT on the HIP build. The laptop is an RTX 4060 and a Radeon 890M on the CUDA and HIP hybrid build. No prompt log or timing was attached to that report.
Failed: none observed.
Not run: a SYCL build of this commit, because the port does not compile these files. A new measurement of the skip.

Limits: The startup line no longer prints the +10..20% figure while a helper is attached, because that figure was measured without one.

Changes since the last update (2026-10-27)

  • Rebased onto upstream main (0.2.6, 4b9e05a2); content unchanged. New tip 59ff6ab0 (single commit). The 4c1f0dda hash in the Validation section is the pre-rebase lineage.
  • Equivalent content (the same rebased delta on the owner's deploy branch nixos, pin 3032afd8) runs daily on both machines, each with a helper GPU attached: the desktop on the HIP build (RX 6800 + RX 6900 XT) and the laptop on the CUDA+HIP hybrid build (RTX 4060 + Radeon 890M).
  • Serve-side follow-up PRs in the same stack: #4306 (session ladder) and #4307 (unload that works). Neither touches this diff.

Changes since the last update (2026-10-30)

  • Rebased onto upstream v0.2.8 (870aedd9); content unchanged. New tip a3870a87 (single commit). The 4c1f0dda hash in the Validation section remains the pre-rebase lineage.
  • The owner's rebuilt deploy lineage (branch nixos, every open PR branch of this stack re-merged onto 870aedd9) passes every owner gate; the HIP-only (gfx1030) and CUDA+HIP hybrid (gfx1150) flavor builds are green with installCheck. Both machines keep serving daily with a helper GPU attached: the desktop on the HIP build, the laptop on the hybrid build.

Changes since the last update (2026-11-07)

  • Rebased onto upstream v0.2.12 (123bad4a); content unchanged. New tip ff5c4638 (single commit; the 4c1f0dda hash in the Validation section remains the pre-rebase lineage). One conflict, in the docs/DETAILS.md startup table: this PR's helper-attached tail-skip row is kept, upstream's 0.2.10 PCIe-share row is kept beside it, and the stale pre-helper single-GPU tail-skip row is dropped, so the table states exactly what the code now does.
  • The owner's redeployed lineage (branch nixos @ c3e4cdc4, every open PR branch of this stack re-merged onto 123bad4a) passes the owner gates; the HIP-only (gfx1030) and CUDA+HIP hybrid (gfx1150) flavor builds are green with installCheck. Both machines keep serving daily with a helper GPU attached: the desktop on the HIP build, the laptop on the hybrid build.

Branch commits were re-signed (GPG ed25519) on 2026-11-07; trees are unchanged from the validated work. The pre-rebase tip a3870a87 stays fetchable as an ancestor of the train tag pin-f6f00908.

Dependencies: none.


🔄 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/Niko1221/Strata/pull/3552 **Author:** [@sakuumomo](https://github.com/sakuumomo) **Created:** 10/21/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr/engine-helper-tail-skip` --- ### 📝 Commits (1) - [`ff5c463`](https://github.com/Niko1221/Strata/commit/ff5c4638e27e5b0ddffca2ca29da1e8d22ca9da7) Skip file-tier experts while a helper GPU is attached ### 📊 Changes **5 files changed** (+30 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+2 -1) 📝 `docs/QUANTS.md` (+2 -1) 📝 `include/strata/core/expert_source.hpp` (+5 -0) 📝 `src/core/expert_source.cpp` (+12 -1) 📝 `src/program/generate.cpp` (+9 -2) </details> ### 📄 Description Problem and result: The file-tier tail skip turned off whenever a helper GPU was attached. A file-tier miss is skipped again while a helper is attached. A row the helper holds, or a row whose bytes are already in the host copy, is still computed. With no helper, a missed tail is skipped even when those bytes are already in RAM. A peer GPU still turns the skip off. The startup line and `docs/DETAILS.md` say the same thing. Related discussion: none for this helper case. The skip itself is the existing `STRATA_ROUTE_TAIL_SKIP` default. Approach: The dispatch no longer treats `remote_count > 0` as a reason to disable the skip. A helper still refuses the skip for a row it holds and for a row `host_copy()` reports as already in a host copy (a resident complement, or an arena that is not a demand-paged file mapping). Peer GPUs keep the old disable. The default rank is unchanged. The SYCL port compiles its own `generate.cpp` and `expert_source.cpp`, so this pull request does not change that backend. Validation: Passed: HIP and CUDA builds of `4c1f0dda` on Linux x86-64, through Nix, with `STRATA_BUILD_TESTS=OFF` and `STRATA_PORTABLE=ON`. HIP: `STRATA_ENABLE_HIP=ON`, `STRATA_ENABLE_CUDA=OFF`, `CMAKE_HIP_ARCHITECTURES=gfx1030`, `STRATA_PREFILL_MMQ=ON`, HIP 7.2.3. Output `/nix/store/c6zp3p826fryl6x7cgp3lsw16z56him8-strata-hip-0.2.1` (`strata` and `strata-device`). The `strata` binary contains the `gfx1030` name. CUDA: `STRATA_ENABLE_CUDA=ON`, `STRATA_ENABLE_HIP=OFF`, `STRATA_HYBRID` left off, `CMAKE_CUDA_ARCHITECTURES=89-real`, `STRATA_PREFILL_MMQ=OFF`, CUDA 12.9.86, gcc 14.4.0. Output `/nix/store/yr652vys91l94sj7dvxigsz6a2ynjgpy-strata-cuda-0.2.1` (`strata` and `strata-device`). The author served on two Linux machines, each with a helper GPU, and reports that both function as intended. The desktop is an RX 6800 and an RX 6900 XT on the HIP build. The laptop is an RTX 4060 and a Radeon 890M on the CUDA and HIP hybrid build. No prompt log or timing was attached to that report. Failed: none observed. Not run: a SYCL build of this commit, because the port does not compile these files. A new measurement of the skip. Limits: The startup line no longer prints the +10..20% figure while a helper is attached, because that figure was measured without one. ## Changes since the last update (2026-10-27) - Rebased onto upstream `main` (0.2.6, `4b9e05a2`); content unchanged. New tip `59ff6ab0` (single commit). The `4c1f0dda` hash in the Validation section is the pre-rebase lineage. - Equivalent content (the same rebased delta on the owner's deploy branch `nixos`, pin `3032afd8`) runs daily on both machines, each with a helper GPU attached: the desktop on the HIP build (RX 6800 + RX 6900 XT) and the laptop on the CUDA+HIP hybrid build (RTX 4060 + Radeon 890M). - Serve-side follow-up PRs in the same stack: #4306 (session ladder) and #4307 (unload that works). Neither touches this diff. ## Changes since the last update (2026-10-30) - Rebased onto upstream `v0.2.8` (`870aedd9`); content unchanged. New tip `a3870a87` (single commit). The `4c1f0dda` hash in the Validation section remains the pre-rebase lineage. - The owner's rebuilt deploy lineage (branch `nixos`, every open PR branch of this stack re-merged onto `870aedd9`) passes every owner gate; the HIP-only (gfx1030) and CUDA+HIP hybrid (gfx1150) flavor builds are green with installCheck. Both machines keep serving daily with a helper GPU attached: the desktop on the HIP build, the laptop on the hybrid build. ## Changes since the last update (2026-11-07) - Rebased onto upstream `v0.2.12` (`123bad4a`); content unchanged. New tip `ff5c4638` (single commit; the `4c1f0dda` hash in the Validation section remains the pre-rebase lineage). One conflict, in the `docs/DETAILS.md` startup table: this PR's helper-attached tail-skip row is kept, upstream's 0.2.10 PCIe-share row is kept beside it, and the stale pre-helper single-GPU tail-skip row is dropped, so the table states exactly what the code now does. - The owner's redeployed lineage (branch `nixos` @ `c3e4cdc4`, every open PR branch of this stack re-merged onto `123bad4a`) passes the owner gates; the HIP-only (gfx1030) and CUDA+HIP hybrid (gfx1150) flavor builds are green with installCheck. Both machines keep serving daily with a helper GPU attached: the desktop on the HIP build, the laptop on the hybrid build. Branch commits were re-signed (GPG ed25519) on 2026-11-07; trees are unchanged from the validated work. The pre-rebase tip `a3870a87` stays fetchable as an ancestor of the train tag `pin-f6f00908`. Dependencies: none. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
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
Niko1221/Strata#4687
No description provided.