mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1983] [CLOSED] Linux CUDA: warm adaptive-overlap callbacks before host pinning (opt-in) #3790
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3790
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1983
Author: @oal
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:fix/adaptive-overlap-callback-affinity📝 Commits (1)
dc09eb6generate: warm CUDA callbacks before host-core pinning (opt-in)📊 Changes
4 files changed (+171 additions, -1 deletions)
View changed files
➕
bench/micro/cuda_callback_affinity.cpp(+67 -0)➕
bench/results/2026-10-11-rtx-5090-callback-affinity/README.md(+84 -0)📝
docs/DETAILS.md(+8 -1)📝
src/program/generate.cpp(+12 -0)📄 Description
Related to #1975.
Change
Add a Linux/CUDA-only opt-in,
STRATA_ADAPT_CALLBACK_WARMUP=1: submit and synchronize one no-op CUDA host callback before constructing ExpertPool, while the calling thread still has its original allowed CPU set. This prevents the lazily created callback worker from inheriting the decoding thread's single-core affinity.The engine change is 12 lines. Swap selection, per-layer callbacks/waits, residency updates and GPU math are unchanged. No callback or synchronization is added when the flag is unset or adaptive overlap is disabled; no global default changes. Also includes a standalone reproducer, benchmark report and flag documentation.
Why
On this RTX 5090 / Ryzen 9 9950X system, the decoding host is pinned to CPU 0. CUDA's callback worker created after that inherits CPU 0, competing with the host spinning for its completion. Subsequent copies on that stream cannot proceed until the callback runs.
Standalone CUDA/Linux reproduction, 200 unprofiled callback/spin handshakes:
Inference results
Qwen3.8-Flash-Next GSQ-RCO IQ3_S, existing
--adapt-every 1 --adapt-swaps 160 --adapt-decay 0.97calibration. NVIDIA 610.57.04, CUDA 13.3.33/sm_120, Fedora Silverblue / Ubuntu 26.04 NVIDIA distrobox.Normal/warm-up/warm-up/normal starts, fixed
--pcie-frac 0.4, temperature 0, 512-token caps, no competing inference workload; warm-up rounds excluded:Adaptive-gate waiting, including warm-up, fell from 4.357 ms/window to 0.000343 ms/window. These are a new paired suite, not replacements for #1975's original 126/170 TPS figures.
Full methodology and reproducer commands:
bench/results/2026-10-11-rtx-5090-callback-affinity/README.md.Validation / draft status
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.