[Issue]: HRX preview (v1.0.8, Linux): flm bench gemma4-it:e2b fails at 32k with 'ert state 8'; XRT completes, serve works
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 8/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp, docker, linux
調査の方向性
The failing call is in the HRX runtime path at native_linux_kmq.cc:1140, which reports ert state 8 during hrx_stream_wait, and the failing command is flm bench at its 32k stage. Reproduce with the Docker command in the report and compare the bench path against flm serve, which handles the same prompt sizes. Done means the 32k bench stage completes on HRX with valid results, or the dispatch size or timeout cause is identified.
索引モデルが issue の本文から書いたものです。
説明
Summary
With the v1.0.8 HRX preview package on Linux, flm bench gemma4-it:e2b aborts in its first stage (32k context) on a Ryzen AI 7 PRO 350 (Krackan Point, XDNA2).
Every dispatch fails with amdxdna dispatch did not complete: ert state 8, and the run ends with hrx_buffer_allocate failed.
The same bench with the standard XRT package completes all 6 stages on the same machine, same container image, same weights.
HRX otherwise works here: flm validate passes and flm serve with the same model handles a 31,242-token prompt without errors.
So the failure looks specific to the flm bench path (or its 32k stage), not to HRX in general.
Environment
| Laptop | Lenovo ThinkPad T14s Gen 6 (21TBCTO1WW), BIOS R33ET31W (1.14) |
| CPU / iGPU | AMD Ryzen AI 7 PRO 350, 8C/16T, Radeon 860M |
| RAM | 30 GiB |
| NPU | 1022:17f0 rev 0x20 (Strix/Krackan/Strix Halo NPU), aie2p, 8 columns |
| NPU firmware | 1.1.2.64 |
| Host OS / kernel | Slackware 15.0 -current, Linux 7.2.10, in-tree amdxdna ("amdxdna version: 0.10" in flm validate) |
| Module params present | aie2_max_col, force_cmdlist, force_iova, tdr_timeout_ms (values not readable as non-root) |
| Container | Docker 29.3.0, ubuntu:26.04, --device /dev/accel/accel0 --ulimit memlock=-1 --ipc host |
| FLM | v1.0.8; HRX: HRX_fastflowlm_1.0.8_linux.tar.gz (bare Ubuntu, no extra packages); XRT: fastflowlm_1.0.8_ubuntu26.04_amd64.deb (system libxrt2/libxrt-npu2 from the Ubuntu archive) |
| Model | gemma4-it:e2b (Gemma4-E2B-IT-NPU2), pulled with v1.0.8 |
flm validate output (HRX package, container): kernel 7.2.10, NPU /dev/accel/accel0 with 8 columns, FW 1.1.2.64, amdxdna 0.10, memlock infinity, platform aie2p.
Reproduce
docker run --rm --device /dev/accel/accel0 --ulimit memlock=-1 --ipc host \
-v <HRX_tree>:/opt/flm:ro -v <models>:/app/models:ro -v $PWD/out:/out -w /out \
-e FLM_MODEL_PATH=/app/models -e FLM_DISABLE_UPDATE_CHECK=1 \
ubuntu:26.04 /opt/flm/flm bench gemma4-it:e2b --pmode performance --bench-iterations 2
Result on HRX (invalid)
Reproduced twice with identical output. Log, with the repeated line collapsed:
[FLM] Starting benchmark with 6 stages...
[FLM] Starting benchmark for 32k and iteration 1...
[hrx][ERROR] run::wait hrx_stream_wait: .../amdxdna/native_linux_kmq.cc:1140: INTERNAL; amdxdna dispatch did not complete: ert state 8 (x515)
[FLM] Creating checkpoint at context length 31017
[FLM] TTFT: 11.7753s, Prefill Speed: 2649.89 tokens/s, Decoding Speed: 253.331 tokens/s
[FLM] Starting benchmark for 16k and iteration 1...
[hrx][ERROR] ... ert state 8
[FLM] Failed to allocate hrx::ext::bo: hrx::ext::bo: hrx_buffer_allocate failed
Error: Failed to allocate hrx::ext::bo: hrx::ext::bo: hrx_buffer_allocate failed
The "TTFT 11.8 s / 2650 tok/s" line should not be trusted: the dispatches had failed, and the model output is <unusedNN> tokens.
The process exits after the 16k stage starts, so no result table is produced.
Valid results on the same machine
XRT, flm bench gemma4-it:e2b --pmode performance --bench-iterations 2 (completes)
| Context | TTFT (s) | Prefill (tok/s) | Decode (tok/s) |
|---|---|---|---|
| 1k | 1.623 ± 0.008 | 603.57 ± 3.01 | 23.54 ± 0.01 |
| 2k | 2.494 ± 0.009 | 781.56 ± 2.86 | 22.59 ± 0.05 |
| 4k | 4.542 ± 0.051 | 856.43 ± 9.58 | 21.14 ± 0.05 |
| 8k | 9.136 ± 0.116 | 850.32 ± 10.72 | 18.70 ± 0.04 |
| 16k | 20.697 ± 0.237 | 749.98 ± 8.56 | 15.02 ± 0.01 |
| 32k | 41.140 ± 0.027 | 754.40 ± 0.37 | 10.79 ± 0.02 |
XRT vs HRX through flm serve gemma4-it:e2b --ctx-len 32768 --pmode performance (both complete, HRX has no dispatch errors)
One request per length, max_tokens=16, temperature=0, numbers from the response usage block:
| Prompt tokens | XRT TTFT (s) | HRX TTFT (s) | XRT prefill (tok/s) | HRX prefill (tok/s) | XRT decode (tok/s) | HRX decode (tok/s) |
|---|---|---|---|---|---|---|
| 3,487 | 3.79 | 3.96 | 920.8 | 880.4 | 21.8 | 22.1 |
| 10,648 | 14.38 | 15.60 | 740.5 | 682.7 | 17.4 | 16.7 |
| 21,736 | 35.13 | 34.61 | 618.7 | 628.0 | 13.1 | 13.1 |
| 31,242 | 63.29 | 58.48 | 493.6 | 534.2 | 10.8 | 10.8 |
gemma4-it:12b, flm serve --ctx-len 8192, 24-token prompt, 200 generated tokens, 3 runs each: decode XRT 6.12 / 6.04 / 5.87 tok/s, HRX 6.04 / 5.31 / 5.62 tok/s; TTFT XRT 1.69-1.86 s, HRX 1.85-2.18 s.
Single runs, so roughly ±5% noise. HRX is at parity with XRT in serve mode on this machine.
Questions
- Is
flm benchon HRX known to fail at 32k?ert state 8looks like a command timeout; could a single large dispatch in the bench path exceed the amdxdna TDR timeout, whileservechunks the prefill differently? - Is there a recommended
tdr_timeout_ms(or other amdxdna module parameter) for the HRX path? - Is
--prefill-chunk-lenhonoured byflm bench? I did not try changing it.
Happy to run more tests (other models, --prefill-chunk-len, smaller contexts) and attach full logs.
- 主要言語
- C++
- スター
- 2.1k
- フォーク
- 184
- 平均マージ
- 12時間 22分
- マージ済み PR(30日)
- 239
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ROCm/FastFlowLM のほかの issue
-
Update Gemma tokenizer.json after Google's recent fix対応中かも @four1er が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ROCm/FastFlowLM#1057 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ROCm/FastFlowLM#757 ·
メンテナーはふだん 1 日以内に返信
-
No valid checkpoint to restore + Max length reached on multi-turn tool calls (Qwen3.6-MoE, NPU)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ROCm/FastFlowLM#744 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Truncated tool call is emitted as a complete one (unterminated heredoc reaches the client)対応中かも @Javinator9889 が 72 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ROCm/FastFlowLM#741 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Download timeout対応中かも @stdevPavelmc が 200 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ROCm/FastFlowLM#520 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
ROCm/FastFlowLM の issue をすべて見る
似ている issue
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
difficulty:easy func:gui prio:normal type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NatronGitHub/Natron#2118 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
bug difficulty:easy prio:low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NatronGitHub/openfx-io#523 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
ArduPilot/ardupilot_gazebo#195 ·