[GH-ISSUE #3857] [Engine] gfx928 (Hygon K100AI): an opt-in wave64 build, and what it measures #1644

Closed
opened 2026-11-04 01:52:51 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @DocPang on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3857

This continues #3554, which asks about gfx928 without the environment details. Close this one if you would rather keep everything in that thread; the content below is the scope question, not a second tracker.

Area

[Engine] — model and architecture support.

What do you want to do?

Run Strata on Hygon K100_AI (gfx928) as an opt-in build, the way gfx906 is one. Nothing on the default path for any other card, no change to any default value, every new switch opt-in.

The card: 120 CUs, wave64, 64 KiB LDS, 64 GiB, DTK toolchain, hipBLASLt and rocBLAS in /opt/dtk/lib. It compiles through the existing gfx906 wave64 compat layer (-DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx928) and serves the Qwen3.8-Flash-Next IQ3_XXS build. What it cannot do is use the matrix units it has, because the paths that would are gated off or missing.

I have five candidates, in the order I would send them. Each is a separate PR, and each one I can defend line by line.

# Change Size What it buys on this card
1 STRATA_PREFILL_MMQ accepts the wave64 backend; link hipBLASLt and rocBLAS into it; stub for strata_pf_hcdown_exact_bf16 ~35 lines, 3 files Nothing by itself. Without it the dense GEMMs stay on the native ggml path and the prompt MMQ cannot be built at all
2 __dp4a for gfx928 behind STRATA_GFX928_DOT4 7 lines, 1 file Integer, so the decode output hashes I compare are unchanged. Removes four multiplies per word on every int8 dot
3 Capture the MTP round/step graphs during the prompt pass ~112 lines, 2 files Per process: the first (unscored) prefill +200 ms, the first decode window −86 ms
4 moe_combine specialised on whether scale_down_rows exists ~30 lines combine 411 → 371 ms at 126k prompt
5 Prefill down-projection prefetch (single LDS plane, TH=128) and the `[wd wi]` wide GEMM ~1,300 lines, 3 files

Item 5 is the only one I would want its own issue for before writing a PR: it is the one that changes what the card computes at ctx128 (a float-order change in one fused path, restoreable with a switch), and it is too large to review beside anything else.

What do you do today instead?

I carry a 36-file tree over 0.2.2 and build it out of band. That works for one machine and is not something anyone else can repeat: the tree is a snapshot, not a set of reviewable changes, and every rebase costs me a weekend. The published material is a release repository with the snapshot, the per-file hashes and a rebuild report — https://github.com/DocPang/strata-k100ai/releases/tag/v0.2.0 — not a patch series.

Evidence

Same card, one request at a time, IQ3_XXS, prefill chunk 30602, INT8 KV, expert cache 24576, spec=6. Engine bdbfd934…, 45,674,152 bytes.

suite prefill, this tree prefill, my previous engine ratio
30,603 token 14,232 / 13,947 ms 14,411 / 14,160 ms 0.988 / 0.985
7,556 token 4,497 / 3,851 ms 4,482 / 3,956 ms 1.003 / 0.974
126,857 token 67,401 / 67,350 ms 68,356 / 68,280 ms 0.986 / 0.986

Module timings from the same runs (5 samples against 4, interval overlap checked): hc block 0.89, dequant 0.83, combine+writeback 0.971, qsa select 0.975, gate/up 0.995, gdn recurrence 0.995, qsa attn 1.000, down GEMM 0.998.

Limits, kept separate

  • Not run: a stock-0.2.2-versus-this-tree comparison on this card. The control above is my previous engine, so the table does not attribute a gain to upstream; it only says this tree is the faster of my two. The per-item sizes in the table come from single-knob A/B during development, not from an upstream baseline.
  • Not run: any CUDA, SYCL, RDNA or NVIDIA build of the files above. I have one gfx928 card and DTK; a PR from me would arrive as a draft with that stated, and I would need someone else for the other backends.
  • Not claimed: byte-identical rebuild across directories. The binary embeds __FILE__ paths, so hashes match only inside one build directory. Two clean builds in the same directory are byte-identical.
  • Scope: one model, one quant, one card. Nothing here says the kernels help gfx11, gfx12 or gfx906, and item 5 is the only one that changes output bits on this card.

What I am asking for

Which of 1–5 you would take, in what order, and whether gfx928 as an opt-in build is a thing you want at all. I will rebase each one onto main before sending it, and send it as its own PR with the passed / failed / not run list kept apart.

Originally created by @DocPang on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3857 This continues #3554, which asks about gfx928 without the environment details. Close this one if you would rather keep everything in that thread; the content below is the scope question, not a second tracker. ### Area `[Engine]` — model and architecture support. ### What do you want to do? Run Strata on Hygon K100_AI (**gfx928**) as an **opt-in build**, the way gfx906 is one. Nothing on the default path for any other card, no change to any default value, every new switch opt-in. The card: 120 CUs, wave64, 64 KiB LDS, 64 GiB, DTK toolchain, `hipBLASLt` and `rocBLAS` in `/opt/dtk/lib`. It compiles through the existing gfx906 wave64 compat layer (`-DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx928`) and serves the Qwen3.8-Flash-Next IQ3_XXS build. What it cannot do is use the matrix units it has, because the paths that would are gated off or missing. I have five candidates, in the order I would send them. Each is a separate PR, and each one I can defend line by line. | # | Change | Size | What it buys on this card | | --- | --- | ---: | --- | | 1 | `STRATA_PREFILL_MMQ` accepts the wave64 backend; link hipBLASLt and rocBLAS into it; stub for `strata_pf_hcdown_exact_bf16` | ~35 lines, 3 files | Nothing by itself. Without it the dense GEMMs stay on the native ggml path and the prompt MMQ cannot be built at all | | 2 | `__dp4a` for gfx928 behind `STRATA_GFX928_DOT4` | 7 lines, 1 file | Integer, so the decode output hashes I compare are unchanged. Removes four multiplies per word on every int8 dot | | 3 | Capture the MTP round/step graphs during the prompt pass | ~112 lines, 2 files | Per process: the first (unscored) prefill +200 ms, the first decode window −86 ms | | 4 | `moe_combine` specialised on whether `scale_down_rows` exists | ~30 lines | combine 411 → 371 ms at 126k prompt | | 5 | Prefill down-projection prefetch (single LDS plane, TH=128) and the `[wd|wi]` wide GEMM | ~1,300 lines, 3 files | 0.986–0.988 of the previous engine's prefill on three suites; the "hc read" block goes from 38% behind to 11% ahead | Item 5 is the only one I would want its own issue for before writing a PR: it is the one that changes what the card computes at ctx128 (a float-order change in one fused path, restoreable with a switch), and it is too large to review beside anything else. ### What do you do today instead? I carry a 36-file tree over 0.2.2 and build it out of band. That works for one machine and is not something anyone else can repeat: the tree is a snapshot, not a set of reviewable changes, and every rebase costs me a weekend. The published material is a release repository with the snapshot, the per-file hashes and a rebuild report — https://github.com/DocPang/strata-k100ai/releases/tag/v0.2.0 — not a patch series. ### Evidence Same card, one request at a time, IQ3_XXS, prefill chunk 30602, INT8 KV, expert cache 24576, `spec=6`. Engine `bdbfd934…`, 45,674,152 bytes. | suite | prefill, this tree | prefill, my previous engine | ratio | | --- | ---: | ---: | ---: | | 30,603 token | 14,232 / 13,947 ms | 14,411 / 14,160 ms | 0.988 / 0.985 | | 7,556 token | 4,497 / 3,851 ms | 4,482 / 3,956 ms | 1.003 / 0.974 | | 126,857 token | 67,401 / 67,350 ms | 68,356 / 68,280 ms | 0.986 / 0.986 | Module timings from the same runs (5 samples against 4, interval overlap checked): hc block 0.89, dequant 0.83, combine+writeback 0.971, qsa select 0.975, gate/up 0.995, gdn recurrence 0.995, qsa attn 1.000, down GEMM 0.998. ### Limits, kept separate - **Not run:** a stock-0.2.2-versus-this-tree comparison on this card. The control above is my previous engine, so the table does not attribute a gain to upstream; it only says this tree is the faster of my two. The per-item sizes in the table come from single-knob A/B during development, not from an upstream baseline. - **Not run:** any CUDA, SYCL, RDNA or NVIDIA build of the files above. I have one gfx928 card and DTK; a PR from me would arrive as a draft with that stated, and I would need someone else for the other backends. - **Not claimed:** byte-identical rebuild across directories. The binary embeds `__FILE__` paths, so hashes match only inside one build directory. Two clean builds in the same directory are byte-identical. - **Scope:** one model, one quant, one card. Nothing here says the kernels help gfx11, gfx12 or gfx906, and item 5 is the only one that changes output bits on this card. ### What I am asking for Which of 1–5 you would take, in what order, and whether gfx928 as an opt-in build is a thing you want at all. I will rebase each one onto `main` before sending it, and send it as its own PR with the passed / failed / not run list kept apart.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659772011 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1644
No description provided.