[PR #764] [CLOSED] decode: STRATA_ADAPT_LAG - #463's reproducibility without its stall #2815

Closed
opened 2026-11-04 02:03:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/764
Author: @merbanan
Created: 10/4/2026
Status: ❌ Closed

Base: main ← Head: feat/adapt-lag


📝 Commits (1)

  • 5a4e0d6 decode: STRATA_ADAPT_LAG - #463's reproducibility without its stall

📊 Changes

1 file changed (+17 additions, -2 deletions)

View changed files

📝 src/program/generate.cpp (+17 -2)

📄 Description

#463 made a verify window wait for the adaptive tier's previous swaps (cudaEventSynchronize) so that whether a swapped-in expert runs on the GPU or the CPU in a window - they round differently - no longer depends on when its PCIe copy lands. The wait is bounded by the copy volume: on an RTX 2060 SUPER 8 GB over PCIe 3.0 x8 (Q2_0, 2,262 cache slots) it costs ~4.6 ms of a ~50 ms window at every context length, the same as dropping it with STRATA_ADAPT_NOWAIT=1 recovers.

Now a window takes the pending swaps only once they are STRATA_ADAPT_LAG windows old (default 2), and then waits for their copies, which have landed by then. The window that first computes a swapped-in expert on the GPU still depends only on the window count, so greedy output is as reproducible as with #463's wait; a swapped-in expert just counts one window later. STRATA_ADAPT_LAG=1 is #463's behaviour; STRATA_ADAPT_NOWAIT=1 keeps its meaning. Both decode loops (serve and generate).


🔄 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/764 **Author:** [@merbanan](https://github.com/merbanan) **Created:** 10/4/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/adapt-lag` --- ### 📝 Commits (1) - [`5a4e0d6`](https://github.com/Niko1221/Strata/commit/5a4e0d6d863f8ae5b960c44094452ce36e7a2c44) decode: STRATA_ADAPT_LAG - #463's reproducibility without its stall ### 📊 Changes **1 file changed** (+17 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/program/generate.cpp` (+17 -2) </details> ### 📄 Description #463 made a verify window wait for the adaptive tier's previous swaps (cudaEventSynchronize) so that whether a swapped-in expert runs on the GPU or the CPU in a window - they round differently - no longer depends on when its PCIe copy lands. The wait is bounded by the copy volume: on an RTX 2060 SUPER 8 GB over PCIe 3.0 x8 (Q2_0, 2,262 cache slots) it costs ~4.6 ms of a ~50 ms window at every context length, the same as dropping it with STRATA_ADAPT_NOWAIT=1 recovers. Now a window takes the pending swaps only once they are STRATA_ADAPT_LAG windows old (default 2), and then waits for their copies, which have landed by then. The window that first computes a swapped-in expert on the GPU still depends only on the window count, so greedy output is as reproducible as with #463's wait; a swapped-in expert just counts one window later. STRATA_ADAPT_LAG=1 is #463's behaviour; STRATA_ADAPT_NOWAIT=1 keeps its meaning. Both decode loops (serve and generate). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:03:19 +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#2815
No description provided.