[Issue]: HRX preview (v1.0.8, Linux): flm bench gemma4-it:e2b fails at 32k with 'ert state 8'; XRT completes, serve works
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 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 分钟
- 30 天内合并 PR
- 239
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 天内回复
-
难度 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 天内回复
相似的 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 ·