[PR #1458] [CLOSED] helper cache: configurable VRAM allowance with allocation-floor checks #3471

Closed
opened 2026-11-07 14:41:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1458
Author: @saikiran-rs
Created: 10/7/2026
Status: ❌ Closed

Base: main ← Head: community/helper-vram-reserve-20261007


📝 Commits (1)

  • 0889667 helper cache: configurable VRAM allowance with work-buffer floor

📊 Changes

5 files changed (+165 additions, -8 deletions)

View changed files

📝 CMakeLists.txt (+7 -0)
📝 docs/SECOND_GPU.md (+37 -0)
➕ include/strata/core/remote_reserve.hpp (+41 -0)
📝 src/core/remote_experts.cpp (+19 -8)
➕ src/core/remote_reserve_test.cpp (+61 -0)

📄 Description

Helper expert caches use a fixed 512 MiB allowance during admission. Add STRATA_REMOTE_RESERVE_MIB so a measured setup can explicitly choose a different allowance, while retaining 512 MiB when unset.

What changed

  • Apply the allowance to automatic sizing and explicit helper slot counts.
  • Require space for the existing device work buffers plus 16 MiB of headroom before filling the cache.
  • Reject malformed, out-of-range and undersized values. Admission arithmetic uses subtraction to avoid overflow.
  • Add a CPU-only policy test covering the unchanged default, parsing, the buffer floor and capacity boundaries; document the setting in SECOND_GPU.md.

This changes helper cache admission only. The historical 128 MiB setting was used on one Linux RX 7900 XTX + RX 6800 XT machine; the default remains 512 MiB. Its combined tuning results are documented in the companion benchmark report, with no isolated allowance speedup claimed.

Validation

Based on upstream d5ea7133741e67743c0e886bb426c0ce8d69cf6c (0.1.40.3):

  • CPU-only CMake build and ctest -R '^remote_reserve_test$': passed.
  • Changed remote_experts.cpp compiled against the HIP SDK in a fresh isolated build configuration: passed.
  • git diff --check: passed.

No new GPU/model inference run was performed on this isolated PR. Historical full-context/quality results refer to the earlier combined research build. CUDA and Windows runtime testing remain unmeasured.

Related #1184 handles primary-device selection and resident-RAM helper support; #848 handles a layer split's reserve. Their changes are not duplicated here.


🔄 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/1458 **Author:** [@saikiran-rs](https://github.com/saikiran-rs) **Created:** 10/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `community/helper-vram-reserve-20261007` --- ### 📝 Commits (1) - [`0889667`](https://github.com/Niko1221/Strata/commit/0889667dfb0f6751d6e419e69c1317ec5cae62fb) helper cache: configurable VRAM allowance with work-buffer floor ### 📊 Changes **5 files changed** (+165 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+7 -0) 📝 `docs/SECOND_GPU.md` (+37 -0) ➕ `include/strata/core/remote_reserve.hpp` (+41 -0) 📝 `src/core/remote_experts.cpp` (+19 -8) ➕ `src/core/remote_reserve_test.cpp` (+61 -0) </details> ### 📄 Description Helper expert caches use a fixed 512 MiB allowance during admission. Add `STRATA_REMOTE_RESERVE_MIB` so a measured setup can explicitly choose a different allowance, while retaining 512 MiB when unset. ## What changed - Apply the allowance to automatic sizing and explicit helper slot counts. - Require space for the existing device work buffers plus 16 MiB of headroom before filling the cache. - Reject malformed, out-of-range and undersized values. Admission arithmetic uses subtraction to avoid overflow. - Add a CPU-only policy test covering the unchanged default, parsing, the buffer floor and capacity boundaries; document the setting in SECOND_GPU.md. This changes helper cache admission only. The historical 128 MiB setting was used on one Linux RX 7900 XTX + RX 6800 XT machine; the default remains 512 MiB. Its combined tuning results are documented in the [companion benchmark report](https://github.com/saikiran-rs/Strata/tree/community/amd-helper-1m-report-20261007/bench/results/2026-10-07-community-xtx-6800xt-1m-helper), with no isolated allowance speedup claimed. ## Validation Based on upstream `d5ea7133741e67743c0e886bb426c0ce8d69cf6c` (0.1.40.3): - CPU-only CMake build and `ctest -R '^remote_reserve_test$'`: passed. - Changed `remote_experts.cpp` compiled against the HIP SDK in a fresh isolated build configuration: passed. - `git diff --check`: passed. No new GPU/model inference run was performed on this isolated PR. Historical full-context/quality results refer to the earlier combined research build. CUDA and Windows runtime testing remain unmeasured. Related #1184 handles primary-device selection and resident-RAM helper support; #848 handles a layer split's reserve. Their changes are not duplicated here. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:42 +07:00
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#3471
No description provided.