[Bug]: d3 decision requests keep ~13 CPU cores busy (thread pool spin-waits); no way to cap threads
メンテナーはふだん 1 日以内に返信
@tawei-amd がすでに取り組んでいます。
2026年10月30日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
Start by tracing the d3 decision request path and its CPU matmul and NPU completion handling; the report identifies d3_npu.dll symbols cpu_mm, cpu_func, and lm_head, plus hardware_concurrency as entry points. Reproduce with back-to-back /v1/systemone requests while measuring CPU use and latency. Done means decision threads can be capped and NPU waiting no longer causes sustained CPU spinning, with latency and CPU measurements reported.
索引モデルが issue の本文から書いたものです。
説明
Environment: FastFlowLM 1.0.11, Windows 11 Pro 26200, Ryzen AI 9 HX PRO 475 (12 cores / 24 threads, XDNA 2), NPU driver 32.0.20102.3930. flm serve --decision d3:nano (no chat model loaded).
What we see: back-to-back /v1/systemone requests run at about 0.40 s each with the NPU busy roughly 56% of the time, but flm.exe uses 12.9 cores (54% of all logical CPUs) while doing so: about 5.3 CPU-seconds per 0.4 s decision, 37% of it kernel time, spread over about 25 threads at about 44% each. At idle the server uses 0 CPU. A chat model on the same server (qwen3.6-moe:35b-a3b decode) uses only about 4% CPU, so this is specific to the decision path.
Restricting CPU affinity shows about half of it is waiting, not work:
flm.exe CPU affinity |
Decision median | CPU used | Kernel share |
|---|---|---|---|
| 24 logical CPUs (default) | 399 ms | 12.9 cores | 37% |
| 8 logical CPUs | 426 ms (+7%) | 6.4 cores | 68% |
| 2 logical CPUs | 822 ms | 1.8 cores | 40% |
d3_npu.dll contains CPU matmul paths (cpu_mm, cpu_func, lm_head, AVX-512) and sizes its pool from hardware_concurrency. It looks like the worker threads spin and yield while the NPU runs.
Impact: a decision stream next to other CPU work slows both. With llama.cpp chat on the CPU at the same time, decisions went from 400 to 527 ms (+32%) and chat dropped 13%.
Requests:
- An option or env var to cap the decision path's CPU threads (for example
--threadsorFLM_CPU_THREADS). - Block on the NPU completion (fence or event) instead of spin-waiting, or spin briefly and then sleep.
Happy to re-test a build on this machine.
- 主要言語
- 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 ·