mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3795
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/1992
Author: @Vop3p
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:hip-calibrate-sh-stream📝 Commits (1)
fa26378calibrate: measure the shared-expert stream fork on AMD (STRATA_SH_STREAM, off against on) and keep it per PC📊 Changes
4 files changed (+123 additions, -11 deletions)
View changed files
📝
docs/AMD_HIP.md(+4 -1)📝
setup.py(+9 -3)📝
tools/calibrate.py(+50 -5)📝
tools/test_calibrate.py(+60 -2)📄 Description
Summary
tools/calibrate.pygets a sixth step on AMD: it measures the shared-expert stream fork (STRATA_SH_STREAM) off against on, a restart each, and writesSTRATA_SH_STREAM=1into the config's"env"only when it wins by more thanMIN_GAIN. This is the per-card choice left open in #1272.The HIP default stays off (#816, #826): an RX 6800 on Windows and 4x R9700 decode 12-45% faster without the fork. The same card family on another PC goes the other way (#1272: 2x RX 6900 XT on Linux), and the output is identical either way, so a measurement on the user's PC is the right place to decide it.
What changed
tools/calibrate.py: step 6, HIP only (cfg["backend"] == "hip"), after the adaptive-tier step and with everything chosen before. Both values are set explicitly (0and1), so a value the config already carried does not decide the baseline; two rates each; the existingpick()/MIN_GAINrule and the #1337 failed-start handling.measure()returns the choice as"env";start_enginetakes an optional env;apply_env()sets the chosen variables and removes the otherENV_KEYS, so an older calibration's choice does not linger.setup.py:--calibratewrites"env"into the config and the settings file; a reinstall applies a saved calibration's"env"the same way (one saved before this step leaves"env"alone). Where setup offers calibration is unchanged (NVIDIA only; on AMD it is still./setup.sh --calibrateby hand, #566).docs/AMD_HIP.md: theSTRATA_SH_STREAMnote says calibrate measures it.tools/test_calibrate.py: four tests (the step runs on HIP only and keeps the fork only on a win; a failed start keeps the default;apply_env; setup writes and later removes the variable) and therun()test now checks thathipis passed. 21 of 21 pass.Measured
Real engine (the 0.1.42 tag, built with setup's HIP flags), 2x RX 6900 XT (gfx1030, PCIe 4.0 x8 each), Ryzen 5 5600X, Ubuntu 26.04, ROCm 10.0, GSQ-RCO IQ3_S on a layer split, a setup-style config (
--spec 4 --spec-min-p 0.5, empty"env"). The whole calibration ran in 982 s with no failed start and no stall:STRATA_SH_STREAM=1Identity, separately, with a fixed protocol (
--spec 4 --spec-min-p 0.5, 4K and 32K prompts, two each, fresh starts; the baseline reproduces its text and draft counts across starts): fork on against off gives the same text on 4 of 4 requests on the split and on one card, decode +8.7 / +9.9% (split) and +5.8 / +6.0% (one card).Not tested: Windows HIP, other AMD cards (the step's purpose is that they decide for themselves), a CUDA build (the step does not run there).
Developed with an AI coding assistant; every number above was measured on 2x RX 6900 XT (gfx1030, PCIe 4.0 x8 each) / Ryzen 5 5600X, ROCm 10.0.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.