[PR #3895] [Docs] AMD_HIP: why STRATA_SH_STREAM goes both ways, and leave it off on Windows #4819

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3895
Author: @Vop3p
Created: 10/24/2026
Status: 🔄 Open

Base: main ← Head: docs-sh-stream-why


📝 Commits (1)

  • e326847 docs(AMD_HIP): why STRATA_SH_STREAM goes both ways, and leave it off on Windows

📊 Changes

1 file changed (+19 additions, -0 deletions)

View changed files

📝 docs/AMD_HIP.md (+19 -0)

📄 Description

Problem and result

docs/AMD_HIP.md says STRATA_SH_STREAM "goes both ways on different PCs" and leaves the choice to --calibrate, without saying why. Two new paragraphs say why, and add a Windows observation: on Windows 11 + RX 6900 XT the fork together with KV streaming faulted the engine on its first request.

#816 (RX 6800, Windows, fork on slower), #1272 (2x RX 6900 XT, Linux, fork on faster), 7fd67dd (the HIP default and its R9700 numbers), #1992 (calibration of the switch). Docs only; no default or code changes.

Approach

  • Why it goes both ways: the fork pays only when it has a wait to hide. With CPU experts in the window it forks after the doorbell is published (STRATA_SH_FORK_LATE, src/core/verify.cpp) and runs while the GPU waits for the CPU pool. On a 16 GB card that wait is about half a verify window: STRATA_DECODE_TIMING=1 on one RX 6900 XT under Linux (4,859 slots) gave GPU-reach wait 20.7 of 39.1 ms. With every expert resident there is nothing to hide and the fork is two cross-stream event dependencies per layer (7fd67dd: R9700, --resident-experts, 43.4 vs 62.9 tok/s).
  • Windows: leave it off. Windows 11, i9-10900K, 64 GB, RX 6900 XT, the 0.2.3 rdna2 package (engine 0.1.48) unchanged, Qwen3.8-Flash-Next IQ3_S, 64K context, --kv int8 --kv-resident 32768 --vram-reserve-mib 1536. With STRATA_SH_STREAM=1 the first request failed with "verify: unspecified launch failure" (in other starts first reported by "mtp draft step: unspecified launch failure"; process exit code 0xC0000409). With the fork off, or without --kv-resident, the same setup answered normally.

Validation

Passed:

  • Bisection on the Windows PC above: the same setup plus the switches STRATA_HIP_PROMPT_F16, STRATA_HC_PERSIST, STRATA_HIP_ADAPT_KERNEL_COPY, STRATA_PREFILL_CPU_SHARE=auto, STRATA_PIPED_CONCURRENT, STRATA_PREFILL_STREAM_MIN=2048, STRATA_IO_THREADS=128 and a rocBLAS table, removing one at a time, three short requests each. All set: fault. Each of HC_PERSIST, ADAPT_KERNEL_COPY, PREFILL_STREAM_MIN, the table removed: fault. STRATA_SH_STREAM removed: 3/3 answered. All removed: 3/3 answered.
  • STRATA_SH_STREAM=1 without --kv-resident on the same PC: standard benchmark complete, sanity 12/12 (several runs).
  • Linux, 2x RX 6900 XT, layer split, the same model, STRATA_SH_STREAM=1 and --kv-resident 32768 in production since 0.1.40: no such fault.

Failed:

  • none observed beyond the fault described.

Not run:

  • The faulting kernel was not isolated (AMD_SERIALIZE_KERNEL=3 not tried).
  • Four bisection steps (removing PROMPT_F16, CPU_SHARE, PIPED_CONCURRENT, IO_THREADS) each followed a fault and the engine did not come up within the probe's timeout, so they say nothing either way.
  • Other Windows cards (gfx1031, RDNA3/4); the fork on Windows without the other switches.

Limits

One Windows PC, one card. The Linux timing number is one request on one card.

Developed with an AI coding assistant; every number above was measured on the machines described.


🔄 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/3895 **Author:** [@Vop3p](https://github.com/Vop3p) **Created:** 10/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs-sh-stream-why` --- ### 📝 Commits (1) - [`e326847`](https://github.com/Niko1221/Strata/commit/e326847f73927a49dc5ab00bcc3b7a1ef25a69d2) docs(AMD_HIP): why STRATA_SH_STREAM goes both ways, and leave it off on Windows ### 📊 Changes **1 file changed** (+19 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/AMD_HIP.md` (+19 -0) </details> ### 📄 Description ## Problem and result `docs/AMD_HIP.md` says `STRATA_SH_STREAM` "goes both ways on different PCs" and leaves the choice to `--calibrate`, without saying why. Two new paragraphs say why, and add a Windows observation: on Windows 11 + RX 6900 XT the fork together with KV streaming faulted the engine on its first request. ## Related discussion #816 (RX 6800, Windows, fork on slower), #1272 (2x RX 6900 XT, Linux, fork on faster), 7fd67dd (the HIP default and its R9700 numbers), #1992 (calibration of the switch). Docs only; no default or code changes. ## Approach - **Why it goes both ways:** the fork pays only when it has a wait to hide. With CPU experts in the window it forks after the doorbell is published (`STRATA_SH_FORK_LATE`, `src/core/verify.cpp`) and runs while the GPU waits for the CPU pool. On a 16 GB card that wait is about half a verify window: `STRATA_DECODE_TIMING=1` on one RX 6900 XT under Linux (4,859 slots) gave GPU-reach wait 20.7 of 39.1 ms. With every expert resident there is nothing to hide and the fork is two cross-stream event dependencies per layer (7fd67dd: R9700, `--resident-experts`, 43.4 vs 62.9 tok/s). - **Windows: leave it off.** Windows 11, i9-10900K, 64 GB, RX 6900 XT, the 0.2.3 `rdna2` package (engine 0.1.48) unchanged, Qwen3.8-Flash-Next IQ3_S, 64K context, `--kv int8 --kv-resident 32768 --vram-reserve-mib 1536`. With `STRATA_SH_STREAM=1` the first request failed with "verify: unspecified launch failure" (in other starts first reported by "mtp draft step: unspecified launch failure"; process exit code 0xC0000409). With the fork off, or without `--kv-resident`, the same setup answered normally. ## Validation **Passed:** - Bisection on the Windows PC above: the same setup plus the switches `STRATA_HIP_PROMPT_F16`, `STRATA_HC_PERSIST`, `STRATA_HIP_ADAPT_KERNEL_COPY`, `STRATA_PREFILL_CPU_SHARE=auto`, `STRATA_PIPED_CONCURRENT`, `STRATA_PREFILL_STREAM_MIN=2048`, `STRATA_IO_THREADS=128` and a rocBLAS table, removing one at a time, three short requests each. All set: fault. Each of `HC_PERSIST`, `ADAPT_KERNEL_COPY`, `PREFILL_STREAM_MIN`, the table removed: fault. `STRATA_SH_STREAM` removed: 3/3 answered. All removed: 3/3 answered. - `STRATA_SH_STREAM=1` without `--kv-resident` on the same PC: standard benchmark complete, sanity 12/12 (several runs). - Linux, 2x RX 6900 XT, layer split, the same model, `STRATA_SH_STREAM=1` and `--kv-resident 32768` in production since 0.1.40: no such fault. **Failed:** - none observed beyond the fault described. **Not run:** - The faulting kernel was not isolated (`AMD_SERIALIZE_KERNEL=3` not tried). - Four bisection steps (removing `PROMPT_F16`, `CPU_SHARE`, `PIPED_CONCURRENT`, `IO_THREADS`) each followed a fault and the engine did not come up within the probe's timeout, so they say nothing either way. - Other Windows cards (gfx1031, RDNA3/4); the fork on Windows without the other switches. ## Limits One Windows PC, one card. The Linux timing number is one request on one card. Developed with an AI coding assistant; every number above was measured on the machines described. --- <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#4819
No description provided.