Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
pcie (#2224): the PcieAuto share on HIP outside gfx12 is opt-in (STRATA_PCIE_FRAC_DEFAULT=auto), not a gfx1100 default: the author's gate was no-regression only and a second gfx1100 report saw it never engage
Niko1221b317c23f245f
diff --git a/docs/DETAILS.md b/docs/DETAILS.mdindex 50e787252..5766ba100 100644--- a/docs/DETAILS.md+++ b/docs/DETAILS.md@@ -1706,7 +1706,7 @@ already times: the wall time of the CPU pool per missed expert. With `R` = exper`L / (L + 1.85 R)`, rounded to 0.05 and kept between 0.10 and 0.60; it is changed at most three times (after 48, 96 and 96 more windows, about 10 s ofdecoding), and only by a full step. Each change prints one `PCIe share:` line. A request that sets its own `pcie_frac` is left alone.**`--pcie-frac N` always wins; `STRATA_PCIE_FRAC_DEFAULT=old` keeps the 0.1.41 rule.** Not used with a layer split, `--batch`, a peer GPU, when every-expert is in VRAM, or on SYCL or on HIP other than gfx1200 / gfx1201 (RDNA4, where the measured share is the default since 0.1.43; `STRATA_PCIE_FRAC_DEFAULT=old` opts out). The canonical Q2_0 pack uses it on CUDA since 0.1.43, on Linux by default and on Windows with `STRATA_PCIE_AUTO_CANON=1` (an RTX 5070 there: code +2.5%, a short answer -3.3%). The constant 1.85 is a fit to three machines, so it lands within a step of each machine's best, not on it. On HIP, `STRATA_PCIE_AUTO_SPLIT=1` (opt-in, 0.1.43) also refines a two-stage layer split: the pool speed is read once and each stage takes the share its own probed link gives (2x R9700 at 16 GB-eq, tail skip on: Q2_0 story +4.5%, code +9.9%, 4K +8.8%; IQ3_S story -2.1%, code +8.0%, 4K +23.3%; with three or more stages the pipelined loop does not run it).+expert is in VRAM, or on SYCL or on HIP other than gfx1200 / gfx1201 (RDNA4, where the measured share is the default since 0.1.43; `STRATA_PCIE_FRAC_DEFAULT=old` opts out; on the other HIP parts `STRATA_PCIE_FRAC_DEFAULT=auto` turns it on: an RX 7900 XTX showed no regression, no gain was claimed, #2224). The canonical Q2_0 pack uses it on CUDA since 0.1.43, on Linux by default and on Windows with `STRATA_PCIE_AUTO_CANON=1` (an RTX 5070 there: code +2.5%, a short answer -3.3%). The constant 1.85 is a fit to three machines, so it lands within a step of each machine's best, not on it. On HIP, `STRATA_PCIE_AUTO_SPLIT=1` (opt-in, 0.1.43) also refines a two-stage layer split: the pool speed is read once and each stage takes the share its own probed link gives (2x R9700 at 16 GB-eq, tail skip on: Q2_0 story +4.5%, code +9.9%, 4K +8.8%; IQ3_S story -2.1%, code +8.0%, 4K +23.3%; with three or more stages the pipelined loop does not run it).Measured (interleaved pairs of whole engine runs, new default against `STRATA_PCIE_FRAC_DEFAULT=old`, medians, route tail skip on):diff --git a/src/program/generate.cpp b/src/program/generate.cppindex 1655b8d86..e11f84a6d 100644--- a/src/program/generate.cpp+++ b/src/program/generate.cpp@@ -1648,17 +1648,15 @@ static bool pcie_auto_split_ok() {#endif}-// gfx1100 (RX 7900 XT/XTX/GRE): the same refinement, gate-measured on the one other arch it has run-// on (paired no-regression: 4 alternating starts at 64K, prefill 2189 base vs 2180 with it, decode-// 65.4 vs 65.4; engagement under serve measured: the share refines 0.55 -> 0.25 from the pool's-// 42-45 us/missed expert and the probed 28.4-28.5 GB/s link). Nothing is claimed for the unmeasured-// archs: they keep the gate's "earlier behaviour".+// HIP outside gfx12: the same refinement, opt-in with STRATA_PCIE_FRAC_DEFAULT=auto (#2224). Its author gate-measured it on an+// RX 7900 XTX (gfx1100) as "no regression" only (4 alternating starts at 64K, prefill 2189 base vs 2180 with it, decode 65.4 vs+// 65.4; under serve the share refines 0.55 -> 0.25 from the pool's 42-45 us/missed expert and the probed 28.4-28.5 GB/s link);+// a second report (2x RX 7900 GRE) found it never engages there (95-98% of the experts cached). The gain is measured only on+// gfx1201 (where it is the default, decode_defaults_arch_ok), so the other parts keep the fixed share unless asked.[[maybe_unused]] static bool pcie_auto_fork_arch_ok() {#if defined(STRATA_USE_HIP)- int dev = 0;- cudaDeviceProp p{};- return cudaGetDevice(&dev) == cudaSuccess && cudaGetDeviceProperties(&p, dev) == cudaSuccess &&- strata::kernels::gfx_arch_is(p.gcnArchName, "gfx1100");+ const char* pfd = std::getenv("STRATA_PCIE_FRAC_DEFAULT");+ return pfd != nullptr && std::strcmp(pfd, "auto") == 0;#elsereturn false;#endif@@ -2904,10 +2902,8 @@ int main(int argc, char** argv) {o.pcie_frac = pcie_frac_for_gbps(bw, base);std::fprintf(stderr, "strata generate: PCIe probe: %.1f GB/s host->device (best of %s) -> pcie_frac %.2f ""(default %.2f)\n", bw, bursts.c_str(), o.pcie_frac, base);- // 0.1.43 upstream: split opt-in + gfx12 default-on (decode_defaults_arch_ok). gfx1100 joins it:- // the refinement is engine-generic (pool timings + miss counts vs the probed link), the start-up- // probe here is already best-of-4 with +-0.7% spread, and on gfx1100 it is gate-measured- // (pcie_auto_fork_arch_ok). Every other AMD part keeps its earlier behaviour;+ // 0.1.43: split opt-in + gfx12 default-on (decode_defaults_arch_ok). Other HIP parts: STRATA_PCIE_FRAC_DEFAULT=auto+ // turns the refinement on (pcie_auto_fork_arch_ok); the pool timings and miss counts it reads are engine-generic.// STRATA_PCIE_FRAC_DEFAULT=old keeps the start-up rule everywhere.o.pcie_frac_auto = (o.layer_split.empty() || pcie_auto_split_ok()) && !pf_old &&(decode_defaults_arch_ok() || pcie_auto_fork_arch_ok());