Skip to content

[Engine] Inkling 2 on AMD native Linux (gfx1200): prompts ~4x below an unmerged branch #309

Backlog

Description

@Tako88

Area

[Engine] (speed, kernels, models, the server and API)

Your question

I ran Inkling 2 Mini on an AMD card on native Linux, which the Inkling page lists as not run yet. It works, but prompts
are about 4x slower than an unmerged branch on the same card. Is that the expected state today, and is that branch's
work going into main?

Setup: RX 9060 XT 16 GB, gfx1200, CachyOS, kernel 7.3.5-2-cachyos, ROCm 10.1.0, no container. Main at 36e654b, built
from source with cmake -S engine -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF -DCMAKE_HIP_ARCHITECTURES=gfx1200 and --target strata-poly -j4. It configured and built clean in about two minutes.

The branch I am comparing against is 3bc4042 from
https://github.com/okada-shogo/PolyStrata/tree/inkling2-amd-preview (15 commits on old PR #200). It gives prompt
attention a wave32 WMMA kernel on gfx12 by default and makes NVFP4's int8 prompt tiles the HIP default. Main has
neither on AMD as far as I can see, and those two look like the whole difference.

Two questions:

  1. Is ~250-290 tok/s prompts the expected state for Inkling 2 on RDNA4, or should main do better on gfx1200 and
    something in my build or flags is wrong?
  2. Is the preview branch's work planned as PRs? poly: Inkling 2 Mini (inkling2 / inkling2_loop) #200 is closed and I could not find it in the open ones.

What you tried

  • Built main twice: the default build, and one with -DSTRATA_POLY_MMQ=ON -DSTRATA_GGML_DIR=engine/third_party/strata-llama.
    The default is faster, so the numbers below use it.
  • Ran the same two models and the same prompts on the preview build from the branch above, on the same card.
  • Compared greedy output: main and the preview build give the same token ids on both models, so only speed differs.
  • Load: UD-Q2_K_XL fits whole (3,072 of 3,072 experts, 7.3 GiB). UD-Q4_K_M keeps 1,976 of 3,072 (8.9 GiB).
  • Did not run the HIP tests, Windows, other cards, or prompts past 8,192 tokens.

Results

--max-context 32768 --vram-reserve-mib 2048 --kv q8_0, greedy, one engine a run. Prompts are 2,048 and 8,192 tokens
of text. Writing is 128 tokens after a 1,200-token prompt. Two runs of the default build differ by under 2%.

UD-Q2_K_XL 2,048 UD-Q2_K_XL 8,192 UD-Q4_K_M 2,048 UD-Q4_K_M 8,192 writing
main, default build 274 tok/s 286 215 265 39.4
main, STRATA_POLY_MMQ=ON 171 172 53 81 39.2
preview branch 3bc4042 1,188 1,304 1,019 863 44.5

Activity

  1. added
    needs-format
    on Nov 24, 2026
  2. github-actions commented on Nov 24, 2026

    @github-actions

    Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

    • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

    Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

    Details: CONTRIBUTING.md

  3. changed the title [-]Inkling 2 on AMD: native Linux, RX 9060 XT (gfx1200), ROCm 10.1[/-] [+][Engine] Inkling 2 on AMD native Linux (gfx1200): prompts ~4x below an unmerged branch[/+] on Nov 24, 2026
  4. removed
    needs-format
    on Nov 24, 2026
  5. github-actions commented on Nov 24, 2026

    @github-actions

    Thanks, this follows the format now.

  6. okada-shogo commented on Nov 24, 2026

    @okada-shogo
    Contributor

    Thanks for the careful numbers. Short answers:

    1. No, ~250-290 tok/s is not what RDNA4 can do. On main, RDNA4's prompt expert products dequantize each expert to FP16 and call rocBLAS once per expert. ROCm 10.x looks much slower on that path: on our RX 9070 XT, one build of main read a 2,048-token prompt 4.6x slower on Windows (setup's ROCm 10.2) than on native Linux (ROCm 7.2.4).
    2. Yes. The work is now in separate open PRs ([Engine] AMD: opt-in int8 matrix-core kernel for prompts #292 int8 prompt tiles on RDNA3/RDNA4, [Engine] Inkling 2 on AMD under WSL2: simpler decode graph #293-[Engine] Inkling 2 on AMD: fuse the clip and KV-store kernels #295, [Engine] Inkling 2 on AMD: GPU doorbell for experts in RAM #306 and others).

    To try them together now, there is a new preview branch:
    https://github.com/okada-shogo/PolyStrata/tree/inkling2-amd-preview-2
    See PREVIEW-AMD.md for what is in it and how to build it.
    Build it as you built main, with -DCMAKE_HIP_ARCHITECTURES=gfx1200. It runs the prompt expert products on the int8 matrix cores by default, not through rocBLAS (STRATA_POLY_HIP_INT8=0 turns that off).
    If you use setup or a run config it wrote: setup adds --attn-requant q5_0 --loop-bf16 --tail-skip 4 whenever the card cannot hold every expert of the size, on any OS. Run setup with --inkling-small-card off or remove the three flags; --tail-skip skips experts and changes the output.

    What we measured on an RX 9070 XT (gfx1201, native Linux, ROCm 7.2.4, --threads 11 --vram-reserve-mib 700 --kv fp16, mean of 3 runs, the same flags for both). Your card has half the compute units, so expect lower numbers:

    Card Model Measure main preview-2
    RX 9070 XT 16 GB IQ4_NL prompt 2,048 (tok/s) 1,121.7 1,685.8
    RX 9070 XT 16 GB IQ4_NL decode after 302 (tok/s) 63.9 78.0
    RX 9070 XT 16 GB UD-Q2_K_XL prompt 2,048 (tok/s) 1,405.6 2,583.8
    RX 9070 XT 16 GB UD-Q2_K_XL decode after 302 (tok/s) 65.7 84.0

    We have not run gfx1200 or ROCm 10.1. Could you post your table again with a column for preview-2? If prompts are still far below the old preview's 1,188-1,304, a run with ROCm 7.2.x would tell us whether ROCm 10.1 is the cause.

    I'm still working on porting changes from the old AMD preview branch based on #200, but once the currently open PRs merge it should be a touch faster I think.

  7. okada-shogo commented on Nov 24, 2026

    @okada-shogo
    Contributor

    Correction on the ROCm part: ROCm 10 itself isn't slower (on our RX 9070 XT, main reads 2K prompts at 1,372 tok/s on 10.2 vs 1,286 on 7.2.4). The likely cause on your system is Arch's rocblas package (which CachyOS uses): it's built with -DBUILD_WITH_HIPBLASLT=OFF, and without hipBLASLt main's prompt path runs 57% slower (same on both ROCm versions). The preview's int8 path doesn't use rocBLAS for the expert products, so it should be much less affected. A ROCm 7.2.x run isn't needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions