[GH-ISSUE #690] Layer split: native prefill kernels fail on the second GPU (no kernel image available), regardless of which card it is #321

Closed
opened 2026-11-04 01:41:56 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Nauclerus on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/690

Summary

A two-GPU AMD layer split starts normally, decodes normally, and reads short prompts normally — but the first prompt larger than the prompt chunk fails with no kernel image is available for execution on the device, thrown by the native prefill kernels.

The failure follows the second device in the split, not the architecture: swapping the card order fails identically. Each card works fine on its own with the same binary.

Machine

  • openSUSE Tumbleweed, kernel 7.2.7-1-default, user in the render group
  • Ryzen 7 5800X3D (no AVX-512), 62 GiB RAM
  • GPU 0: RX 7900 XTX (gfx1100), 24 GB — boot GPU, drives the desktop
  • GPU 1: RX 6950 XT (gfx1030), 16 GB
  • ROCm 7.10.0a20251120 from setup's own wheels (rocm_sdk_core / rocm_sdk_devel / rocm_sdk_libraries_gfx110X-dgpu), hipBLASLt 1.2.x
  • Engine 0.1.38, built by setup with both arches:
cmake -G Ninja -S strata -B build-hip -DCMAKE_BUILD_TYPE=Release \
  -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF -DSTRATA_BUILD_TESTS=OFF \
  -DSTRATA_PREFILL_MMQ=ON -DCMAKE_HIP_ARCHITECTURES=gfx1030;gfx1100 \
  -DCMAKE_HIP_COMPILER=.../llvm/bin/clang++ -DCMAKE_HIP_COMPILER_ROCM_ROOT=... -DCMAKE_PREFIX_PATH=...

engine/BUILD.json: {"backend":"hip","version":"0.1.38","archs":["gfx1030","gfx1100"],"src":"d844541998f4d168"}

Model: Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS, engine args --expert-profile --expert-cache auto --prefill auto --spec 4 --mtp --kv int8 --kv-resident 32768 --max-context 262144 --vram-reserve-mib 5120.

Repro

Config "backend": "hip", "gpu": [0, 1], "layer_split": "auto", start the server, then send a prompt bigger than the prompt chunk (8192 tokens here):

$ curl -s http://127.0.0.1:8082/v1/chat/completions -H 'Content-Type: application/json' \
    -d '{"model":"qwen3.8-flash-next-iq2_xs","messages":[{"role":"user","content":"<44022 tokens>"}],"max_tokens":4}'
{"error": {"type": "invalid_request_error", "message": "prefill PLE: native PLE postops launch: no kernel image is available for execution on the device"}}

Startup looks healthy:

strata generate: layer split across 2 GPUs: CUDA0, then CUDA1 (split auto)
strata generate: layer split auto: K=34 - predicted 32.4 ms per decode window; the caches hold 19023 of 24576 profiled pairs (~99.3% of the routed mass)
strata serve: layer split: layers 0-33 (CUDA0), 34-47 (CUDA1), one hand-off per window

The same request on the same server with a smaller prompt succeeds, so the split itself works:

strata serve: prompt 617 tokens = 0 reused + 617 read in 1779 ms (346.7 tok/s), 1273 generated in 16288 ms (78.2 tok/s)
strata serve: prompt 6553 tokens = 0 reused + 6553 read in 10357 ms (632.7 tok/s), 14 generated in 241 ms
prefill swiglu_interleaved: no kernel image is available for execution on the device

6553 tokens (one chunk) is the largest prompt that succeeds; the next request — the first one that spans more than one chunk — fails. Both native prefill kernels I hit are the same shape of failure: prefill swiglu_interleaved and prefill PLE: native PLE postops launch.

Controls that pass

  • 6950 XT alone (gpu: 1), same binary, same 44022-token prompt: HTTP 200.
  • 7900 XTX alone (gpu: 0), same binary, 44022-token and 110022-token prompts: HTTP 200.
  • So both code objects are in the binary (BUILD.json lists both archs), and the engine's own arch check is happy with gfx1030. An earlier single-arch build correctly refused the card at startup, which shows the check works:
strata generate: GPU 1 (AMD Radeon RX 6950 XT, gfx1030) is not an architecture this Strata engine was compiled for (gfx1100); compile it for this card ...
  • Order does not matter. With gpu: [1, 0] (6950 first, XTX second) the same error appears, this time on the XTX. CUDA_MODULE_LOADING=LAZY does not change it.

What I think is happening

native_ple_postops.cu has no arch guards; the launch is a plain <<<...,st>>> followed by launch_check() (lines 197–199, the throw at 171), and prefill.cpp does set the device per stage (cudaSetDevice(pp->dev)), so the kernel is dispatched to the right card — but the runtime has no code object for it there. Since the failure tracks "the second device" rather than "the gfx1030 card", my guess is that the fatbinary's code object is selected once, for the device that is current when the module is first loaded, and a second device with a different arch gets nothing.

Two questions:

  1. Is the code object loaded per device, or once against device 0?
  2. Is there a way to turn the native prefill kernels off per device? --native enables them (src/program/generate.cpp:1618) and --native-ple-postops is opt-in only — there is no off-switch, so I cannot test whether the reference path would work on the second card.

Side note, probably not the cause but worth mentioning: setup's wheels on this machine are the gfx110X-dgpu variant, so there is no gfx1030 Tensile library, and no hipBLASLt tuning table for gfx1030 with this hipBLASLt version. The failing kernels are the engine's own, not hipBLASLt.

Happy to test a patch or a build.

Originally created by @Nauclerus on GitHub (Oct 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/690 ## Summary A two-GPU AMD layer split starts normally, decodes normally, and reads short prompts normally — but the **first prompt larger than the prompt chunk fails** with `no kernel image is available for execution on the device`, thrown by the native prefill kernels. The failure follows the **second device in the split**, not the architecture: swapping the card order fails identically. Each card works fine on its own with the same binary. ## Machine - openSUSE Tumbleweed, kernel `7.2.7-1-default`, user in the `render` group - Ryzen 7 5800X3D (no AVX-512), 62 GiB RAM - GPU 0: RX 7900 XTX (gfx1100), 24 GB — boot GPU, drives the desktop - GPU 1: RX 6950 XT (gfx1030), 16 GB - ROCm 7.10.0a20251120 from setup's own wheels (`rocm_sdk_core` / `rocm_sdk_devel` / `rocm_sdk_libraries_gfx110X-dgpu`), hipBLASLt 1.2.x - Engine 0.1.38, built by setup with both arches: ``` cmake -G Ninja -S strata -B build-hip -DCMAKE_BUILD_TYPE=Release \ -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF -DSTRATA_BUILD_TESTS=OFF \ -DSTRATA_PREFILL_MMQ=ON -DCMAKE_HIP_ARCHITECTURES=gfx1030;gfx1100 \ -DCMAKE_HIP_COMPILER=.../llvm/bin/clang++ -DCMAKE_HIP_COMPILER_ROCM_ROOT=... -DCMAKE_PREFIX_PATH=... ``` `engine/BUILD.json`: `{"backend":"hip","version":"0.1.38","archs":["gfx1030","gfx1100"],"src":"d844541998f4d168"}` Model: Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS, engine args `--expert-profile --expert-cache auto --prefill auto --spec 4 --mtp --kv int8 --kv-resident 32768 --max-context 262144 --vram-reserve-mib 5120`. ## Repro Config `"backend": "hip", "gpu": [0, 1], "layer_split": "auto"`, start the server, then send a prompt bigger than the prompt chunk (8192 tokens here): ``` $ curl -s http://127.0.0.1:8082/v1/chat/completions -H 'Content-Type: application/json' \ -d '{"model":"qwen3.8-flash-next-iq2_xs","messages":[{"role":"user","content":"<44022 tokens>"}],"max_tokens":4}' {"error": {"type": "invalid_request_error", "message": "prefill PLE: native PLE postops launch: no kernel image is available for execution on the device"}} ``` Startup looks healthy: ``` strata generate: layer split across 2 GPUs: CUDA0, then CUDA1 (split auto) strata generate: layer split auto: K=34 - predicted 32.4 ms per decode window; the caches hold 19023 of 24576 profiled pairs (~99.3% of the routed mass) strata serve: layer split: layers 0-33 (CUDA0), 34-47 (CUDA1), one hand-off per window ``` The same request on the same server with a smaller prompt succeeds, so the split itself works: ``` strata serve: prompt 617 tokens = 0 reused + 617 read in 1779 ms (346.7 tok/s), 1273 generated in 16288 ms (78.2 tok/s) strata serve: prompt 6553 tokens = 0 reused + 6553 read in 10357 ms (632.7 tok/s), 14 generated in 241 ms prefill swiglu_interleaved: no kernel image is available for execution on the device ``` 6553 tokens (one chunk) is the largest prompt that succeeds; the next request — the first one that spans more than one chunk — fails. Both native prefill kernels I hit are the same shape of failure: `prefill swiglu_interleaved` and `prefill PLE: native PLE postops launch`. ## Controls that pass - **6950 XT alone** (`gpu: 1`), same binary, same 44022-token prompt: HTTP 200. - **7900 XTX alone** (`gpu: 0`), same binary, 44022-token and 110022-token prompts: HTTP 200. - So both code objects are in the binary (BUILD.json lists both archs), and the engine's own arch check is happy with gfx1030. An earlier single-arch build correctly refused the card at startup, which shows the check works: ``` strata generate: GPU 1 (AMD Radeon RX 6950 XT, gfx1030) is not an architecture this Strata engine was compiled for (gfx1100); compile it for this card ... ``` - **Order does not matter.** With `gpu: [1, 0]` (6950 first, XTX second) the same error appears, this time on the XTX. `CUDA_MODULE_LOADING=LAZY` does not change it. ## What I think is happening `native_ple_postops.cu` has no arch guards; the launch is a plain `<<<...,st>>>` followed by `launch_check()` (lines 197–199, the throw at 171), and `prefill.cpp` does set the device per stage (`cudaSetDevice(pp->dev)`), so the kernel is dispatched to the right card — but the runtime has no code object for it there. Since the failure tracks "the second device" rather than "the gfx1030 card", my guess is that the fatbinary's code object is selected once, for the device that is current when the module is first loaded, and a second device with a different arch gets nothing. Two questions: 1. Is the code object loaded per device, or once against device 0? 2. Is there a way to turn the native prefill kernels off per device? `--native` enables them (`src/program/generate.cpp:1618`) and `--native-ple-postops` is opt-in only — there is no off-switch, so I cannot test whether the reference path would work on the second card. Side note, probably not the cause but worth mentioning: setup's wheels on this machine are the `gfx110X-dgpu` variant, so there is no gfx1030 Tensile library, and no hipBLASLt tuning table for gfx1030 with this hipBLASLt version. The failing kernels are the engine's own, not hipBLASLt. Happy to test a patch or a build.
Author
Owner

@christopherrobertbrooks-tech commented on GitHub (Oct 4, 2026):

A data point from NVIDIA, where the same pattern does not happen: a mixed-architecture layer split with prompts well past
the prompt chunk, in both card orders.

Machine: Tesla V100-PCIE-32GB (Volta, sm_70, PCIe 3.0 x4) + RTX 4070 12 GB (Ada, sm_89, x16), i7-13700KF, 16 GB RAM,
Ubuntu 24.04, driver 580.173.02, CUDA 12.9. Engine 0.1.39 built by setup with both architectures
(engine-cuda12/BUILD.json: "archs": [70, 89], --cuda 12 because of the Volta card).

Model / config: Qwen3.8-Flash-Next IQ2_XS, "layer_split": "auto", low-RAM mode (--mmap-experts), --max-context 131072, --kv int8, --spec 4, MTP; the 2x MI50 report's benchmark.py (3 runs each at 4,096 / 32,768 / 128,000 fresh
prompt tokens, 256-token cap) and tools/needle_bench.py (32k and 128k, depths 10/50/90).

Order Auto split 32K and 128K prompts Needles Decode tok/s (4K / 32K / 128K)
V100 first ("gpu": [1, 0]) K=39: V100 layers 0-38, 4070 39-47 6 of 6 OK 6/6 84.9 / 81.5 / 75.1
4070 first ("gpu": [0, 1]) K=11: 4070 layers 0-10, V100 11-47 6 of 6 OK 6/6 79.1 / 83.8 / 77.1

No no kernel image is available (or any other error) in the engine logs in either order; every prompt larger than the
8,192-token chunk went through the native prefill on the second device. So on CUDA a two-architecture build handles it
whichever card is second -- which may help narrow #690 to the HIP build or its native prefill kernels.

Full numbers are in our community benchmark PR (#823 covers the V100 alone; the dual-card run is in our notes and can go up
as a second report if useful).

Drafted with an AI assistant (Claude) from our runs and logs, and checked by me.

<!-- gh-comment-id:5985234418 --> @christopherrobertbrooks-tech commented on GitHub (Oct 4, 2026): A data point from NVIDIA, where the same pattern does **not** happen: a mixed-architecture layer split with prompts well past the prompt chunk, in both card orders. **Machine:** Tesla V100-PCIE-32GB (Volta, sm_70, PCIe 3.0 x4) + RTX 4070 12 GB (Ada, sm_89, x16), i7-13700KF, 16 GB RAM, Ubuntu 24.04, driver 580.173.02, CUDA 12.9. Engine 0.1.39 built by setup with both architectures (`engine-cuda12/BUILD.json`: `"archs": [70, 89]`, `--cuda 12` because of the Volta card). **Model / config:** Qwen3.8-Flash-Next IQ2_XS, `"layer_split": "auto"`, low-RAM mode (`--mmap-experts`), `--max-context 131072`, `--kv int8`, `--spec 4`, MTP; the 2x MI50 report's `benchmark.py` (3 runs each at 4,096 / 32,768 / 128,000 fresh prompt tokens, 256-token cap) and `tools/needle_bench.py` (32k and 128k, depths 10/50/90). | Order | Auto split | 32K and 128K prompts | Needles | Decode tok/s (4K / 32K / 128K) | |---|---|---|---|---| | V100 first (`"gpu": [1, 0]`) | K=39: V100 layers 0-38, 4070 39-47 | 6 of 6 OK | 6/6 | 84.9 / 81.5 / 75.1 | | 4070 first (`"gpu": [0, 1]`) | K=11: 4070 layers 0-10, V100 11-47 | 6 of 6 OK | 6/6 | 79.1 / 83.8 / 77.1 | No `no kernel image is available` (or any other error) in the engine logs in either order; every prompt larger than the 8,192-token chunk went through the native prefill on the second device. So on CUDA a two-architecture build handles it whichever card is second -- which may help narrow #690 to the HIP build or its native prefill kernels. Full numbers are in our community benchmark PR (#823 covers the V100 alone; the dual-card run is in our notes and can go up as a second report if useful). Drafted with an AI assistant (Claude) from our runs and logs, and checked by me.
Author
Owner

@Nauclerus commented on GitHub (Oct 6, 2026):

Found the fix on my rig: STRATA_HIP_PROMPT_F16=1 makes the gfx1100 + gfx1030 split work.

I updated to engine 0.1.40 (one-time git reset --hard origin/main, then ./update.sh; local-hip rebuilt for gfx1030;gfx1100 with a system ROCm 7.2). The split still failed identically for prompts past the chunk, so the 0.1.39/0.1.40 split changes did not cover this.

Then I saw 0.1.40's own tip on the gfx1030 stage:

strata prefill: HIP device 1 gfx1030 - tip: STRATA_HIP_PROMPT_F16=1 reads long prompts about 2x faster here
(FP16 prompt GEMMs, rocBLAS is tuned only for FP16 on gfx103x; ...)

Setting STRATA_HIP_PROMPT_F16=1 fixes it completely.

Rig: RX 7900 XTX (gfx1100, first) + RX 6950 XT (gfx1030), Ryzen 7 5800X3D (AVX2), 62 GiB, openSUSE Tumbleweed, system ROCm 7.2 (/usr/lib64; both gfx1030 and gfx1100 Tensile kernels present), engine 0.1.40 local-hip, Qwen3.8-Flash-Next IQ3_XXS native pack, "gpu": [0,1], "layer_split": "auto", --max-context 131072 --kv int8 --vram-reserve-mib 5120, resident arena.

Run Result
split, no STRATA_HIP_PROMPT_F16 prefill PLE: native PLE postops launch: no kernel image (fails with either card order, so it follows the second stage)
split, STRATA_HIP_PROMPT_F16=1, 46,023-token prompt HTTP 200, prefill 1,398-1,452 tok/s
split, STRATA_HIP_PROMPT_F16=1, 83,222-token prompt HTTP 200, prefill 1,421 tok/s
split, STRATA_HIP_PROMPT_F16=1, 420-token generation 66.1 tok/s decode, 91.2% expert-cache hit, 0 file reads
split, STRATA_HIP_PROMPT_F16=1, 3× repeat of the 46K prompt 3/3 OK (repeat prompts reuse the cache)
single gfx1030, no flag, 46,023-token prompt HTTP 200, but slow (~3m29s)

So it is neither a missing gfx1030 code object (the binary has 118 gfx1030 / 119 gfx1100 code objects and each card works alone) nor simply a missing BF16 kernel on gfx1030 (a lone 6950 XT reads a 46K prompt without the flag). It is the second stage of the split running the batched prefill that hits no kernel image; forcing the prompt's 16-bit GEMMs to FP16 avoids it. The error is thrown at the launch_check() in native_ple_postops, so it may be surfacing there rather than being the PLE kernel itself.

Two suggestions:

  1. The switch is global — with it on, both stages log STRATA_HIP_PROMPT_F16=1: the prompt's 16-bit GEMMs run FP16 in and out, so the gfx1100 stage's prompt path also changes rounding. A per-device form (or auto-enabling it only for gfx103x stages in a split) would keep the XTX on the default path.
  2. Given it cleanly unblocks a mixed RDNA3 + RDNA2 split, it may be worth turning on automatically for gfx103x stages (with a note, as the tip already does).

Happy to run any instrumentation or an A/B with STRATA_HIP_PROMPT_F16=0 again, or to test the same on IQ2_XS. Config and full engine logs available on request.

<!-- gh-comment-id:6026110836 --> @Nauclerus commented on GitHub (Oct 6, 2026): **Found the fix on my rig: `STRATA_HIP_PROMPT_F16=1` makes the gfx1100 + gfx1030 split work.** I updated to engine **0.1.40** (one-time `git reset --hard origin/main`, then `./update.sh`; local-hip rebuilt for `gfx1030;gfx1100` with a system ROCm 7.2). The split still failed identically for prompts past the chunk, so the 0.1.39/0.1.40 split changes did not cover this. Then I saw 0.1.40's own tip on the gfx1030 stage: ``` strata prefill: HIP device 1 gfx1030 - tip: STRATA_HIP_PROMPT_F16=1 reads long prompts about 2x faster here (FP16 prompt GEMMs, rocBLAS is tuned only for FP16 on gfx103x; ...) ``` Setting `STRATA_HIP_PROMPT_F16=1` fixes it completely. **Rig:** RX 7900 XTX (gfx1100, first) + RX 6950 XT (gfx1030), Ryzen 7 5800X3D (AVX2), 62 GiB, openSUSE Tumbleweed, system ROCm 7.2 (`/usr/lib64`; both gfx1030 and gfx1100 Tensile kernels present), engine 0.1.40 local-hip, Qwen3.8-Flash-Next **IQ3_XXS** native pack, `"gpu": [0,1]`, `"layer_split": "auto"`, `--max-context 131072 --kv int8 --vram-reserve-mib 5120`, resident arena. | Run | Result | |---|---| | split, **no** `STRATA_HIP_PROMPT_F16` | `prefill PLE: native PLE postops launch: no kernel image` (fails with either card order, so it follows the second stage) | | split, `STRATA_HIP_PROMPT_F16=1`, 46,023-token prompt | HTTP 200, prefill **1,398-1,452 tok/s** | | split, `STRATA_HIP_PROMPT_F16=1`, 83,222-token prompt | HTTP 200, prefill **1,421 tok/s** | | split, `STRATA_HIP_PROMPT_F16=1`, 420-token generation | **66.1 tok/s** decode, 91.2% expert-cache hit, 0 file reads | | split, `STRATA_HIP_PROMPT_F16=1`, 3× repeat of the 46K prompt | 3/3 OK (repeat prompts reuse the cache) | | **single gfx1030**, no flag, 46,023-token prompt | HTTP 200, but slow (~3m29s) | So it is neither a missing gfx1030 code object (the binary has 118 gfx1030 / 119 gfx1100 code objects and each card works alone) nor simply a missing BF16 kernel on gfx1030 (a lone 6950 XT reads a 46K prompt without the flag). It is the **second stage of the split running the batched prefill** that hits `no kernel image`; forcing the prompt's 16-bit GEMMs to FP16 avoids it. The error is thrown at the `launch_check()` in `native_ple_postops`, so it may be surfacing there rather than being the PLE kernel itself. Two suggestions: 1. The switch is **global** — with it on, *both* stages log `STRATA_HIP_PROMPT_F16=1: the prompt's 16-bit GEMMs run FP16 in and out`, so the gfx1100 stage's prompt path also changes rounding. A per-device form (or auto-enabling it only for gfx103x stages in a split) would keep the XTX on the default path. 2. Given it cleanly unblocks a mixed RDNA3 + RDNA2 split, it may be worth turning on automatically for gfx103x stages (with a note, as the tip already does). Happy to run any instrumentation or an A/B with `STRATA_HIP_PROMPT_F16=0` again, or to test the same on IQ2_XS. Config and full engine logs available on request.
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6155951291 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
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#321
No description provided.