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++
hip: one-line start hint for STRATA_HIP_WMMA=1 on gfx12 with --kv int8
Niko1221e9e1757a7f45
diff --git a/docs/AMD_HIP.md b/docs/AMD_HIP.mdindex 77f8e2a72..fe4c3b022 100644--- a/docs/AMD_HIP.md+++ b/docs/AMD_HIP.md@@ -303,7 +303,7 @@ an RX 9070 XT 16 GB and a Radeon AI PRO R9700 32 GB (both gfx1201), a Ryzen 9 39nightly); a user's repeated A/B/A/B with setup's TheRock 7.10 wheels and an i5-12600K measured +1-4%, inside a12-20% run-to-run spread (#432) - how much it gains depends on how much of decode the router is on that setup.`STRATA_HIP_ROUTER_OLD=1` runs the portable kernel.- - `STRATA_HIP_WMMA=1` (opt-in, gfx12 only, int8 KV): the prompt path's QSA attention on RDNA4 matrix cores+ - `STRATA_HIP_WMMA=1` (opt-in, gfx12 only, int8 KV): the prompt path's QSA attention on RDNA4 matrix cores (the engine prints a one-line hint about it at start on gfx12 with `--kv int8`; it never enables it, because the output bits change; setting the variable to anything, 0 included, silences the hint)(`v_wmma_f32_16x16x16_f16`, FP16 hi + lo halves like the CUDA tensor-core kernel; `hip_prompt_attn_wmma` bounds itagainst the FP32 kernel and FP64). 7.2-7.5x the portable kernel; R9700 prompts 4K 1,784 -> 2,427 tok/s, 16K1,797 -> 2,700 (a user with TheRock 7.10: +29-34%, #432). Not bitwise: greedy text differs from token ~50 on, as with the CUDA tensor-core attention. With itdiff --git a/src/program/generate.cpp b/src/program/generate.cppindex eab73e193..e1d3deabf 100644--- a/src/program/generate.cpp+++ b/src/program/generate.cpp@@ -3950,6 +3950,13 @@ int main(int argc, char** argv) {const char* name = named && p.name[0] ? p.name : "(an unnamed GPU)";#if defined(STRATA_USE_HIP)std::fprintf(stderr, "strata generate: GPU %d: %s (%s)\n", dev, name, named ? p.gcnArchName : "?");+ // A hint only, never an action: on RDNA4 with an int8 KV the opt-in matrix-core prompt attention reads prompts+ // about 30% faster (R9700, PR #1318), but its output differs from the default kernel's in the last bits, so it+ // stays the user's choice. Silent when the variable is set to anything (STRATA_HIP_WMMA=0 included).+ if (named && o.kv == "int8" && std::strncmp(p.gcnArchName, "gfx12", 5) == 0 && std::getenv("STRATA_HIP_WMMA") == nullptr)+ std::fprintf(stderr, "strata generate: hint: STRATA_HIP_WMMA=1 reads prompts about 30%% faster on this card with "+ "--kv int8 (prompt attention on the matrix cores); it is off by default because the output "+ "bits change (last-place rounding). Nothing was enabled.\n");#if defined(_WIN32)// #468 #461: which HIP runtime was loaded - the bundled one beside the exe, or an AMD driver's System32 copyif (HMODULE h = GetModuleHandleA("amdhip64_7.dll")) {