Skip to content

inkling2: remove leftover decode experiments and debug switches - #1142

Merged
fastflowlm-devkit-swap-github-app[bot] merged 3 commits into
mainfrom
chore/inkling2-cleanup
Nov 25, 2026
Merged

fastflowlm-devkit-swap-github-app[bot] merged 3 commits into
mainfrom
chore/inkling2-cleanup

Conversation

@tawei-amd

@tawei-amd tawei-amd commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up cleanup to #1131. Nothing user-visible changes; the removed code was either unreachable or behind off-by-default env switches.

Removed

  • The old hybrid decode: inkling2_decode.cpp/.hpp, and the mm_offload::dec_* hooks in the host model. It was superseded by the fused NPU decode (decode_layer + decode_switches) and nothing selected it. The shipped decode.xclbin comes from Inkling2/decode_switches and is unaffected.
  • INKLING2_FUSED_SAMEW: a bandwidth probe that made every layer read layer 0's weights.
  • INKLING2_DUMP_TXN: the generic FLM_DUMP_TXN stays.
  • INKLING2_LMH_HUGE: an off-by-default experiment that put the lm_head weights in 2 MB pages.

Kept for a separate pull request: the unused FLM_Xclbin/Inkling2/decode kernel unit. Deleting it selects the kernel area with an empty build plan, and devkit-stage then fails to find the devkit-xclbins artifact (run 45643380497). That fix is a workflow change, and a workflow change can't share a pull request with a verified swap.

Verified locally (Linux XRT, Strix Halo)

  • Two interleaved rounds of main vs this branch, swapping only libinkling2_npu.so in the same install.
  • Greedy outputs are identical on 4 prompts: arithmetic, a get_weather tool call, a 2.3k-token document, and effort none.
  • api_smoke passes 14/14 on both.
  • Decode is 12.3–12.5 tok/s on both, and prefill is unchanged.

A dev-kit swap commit from the green CI run will follow.

🤖 Generated with Claude Code

- old hybrid decode (inkling2_decode.cpp/.hpp, the mm_offload dec_* hooks
  and the FLM_Xclbin/Inkling2/decode kernel + build unit): superseded by the
  fused NPU decode (decode_layer + decode_switches); nothing selected it
- INKLING2_FUSED_SAMEW (every layer reads layer 0's weights, a bandwidth probe)
- INKLING2_DUMP_TXN (the generic FLM_DUMP_TXN stays)
- INKLING2_LMH_HUGE (an off-by-default mmap + MADV_HUGEPAGE lm_head BO experiment)

Greedy outputs identical to main (4 prompts incl. a tool call and a 2.3k
prompt, 2 interleaved rounds), api_smoke 14/14, decode 12.3-12.5 tok/s as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Security scan found no critical or high findings on lines changed by this pull request

View the security scan run for complete reports.

“New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta.

Deleting the unassigned unit selects the kernel area with an empty build
plan, and devkit-stage then fails to find the devkit-xclbins artifact.
Fixing that needs a CI workflow change, which cannot share a pull request
with a verified swap, so the unit removal moves to its own pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Dev-kit bench

Results of the dev-kit benches in Build and Test run 45648799322 for 762971181a, as that run reported them (its artifacts hold the per-model reports).

Summary

Dev-kit bench (pr) on 762971181a

the pull request's staged packages: this run's numbers only, no comparison (to be designed later)

✅ No hard-gate failure and no soft-gate warning.

Linux XRT

Perf (tok/s; dev-kit against the base package on the same runner)

Model Machine Context Decode base → dev-kit Δ Prefill base → dev-kit Δ Decode Δ vs nightly (same kind)
inkling-2:mini ryzenai-npu4 1k — → 4.4 — — → 243.6 — no baseline for this kind
inkling-2:mini ryzenai-npu4 2k — → 4.4 — — → 298.1 — no baseline for this kind
inkling-2:mini ryzenai-npu4 4k — → 4.2 — — → 394.2 — no baseline for this kind
inkling-2:mini ryzenai-npu4 8k — → 4.1 — — → 393.8 — no baseline for this kind

GSM8K accuracy (%)

Model Nightly baseline This run Δ (points) Notes
inkling-2:mini — 100.0 — time budget spent: 42 of 50 questions asked

Linux HRX

Perf (tok/s; dev-kit against the base package on the same runner)

Model Machine Context Decode base → dev-kit Δ Prefill base → dev-kit Δ Decode Δ vs nightly (same kind)
inkling-2:mini ryzenai-npu4 1k — → 13.7 — — → 454.1 — no baseline for this kind
inkling-2:mini ryzenai-npu4 2k — → 13.4 — — → 490.7 — no baseline for this kind
inkling-2:mini ryzenai-npu4 4k — → 13.4 — — → 489.4 — no baseline for this kind
inkling-2:mini ryzenai-npu4 8k — → 12.6 — — → 497.4 — no baseline for this kind

GSM8K accuracy (%)

Model Nightly baseline This run Δ (points) Notes
inkling-2:mini — 98.0 —

Perf: flm bench, decode and prefill average tok/s per context. A/B is the one perf signal that judges a change; the runners differ by machine kind, so the nightly comparison is informational and only made for the same kind. Accuracy: GSM8K (first 50 questions) and DocVQA (when enabled), greedy; unanswered questions count as wrong. Per-question reports, server logs and CSVs: the devkit-bench-result-* artifacts.

The dev-kit engine libraries and kernels that run 45648799322 built from
7629711, staged into its product builds and tested on the NPU
(devkit_swap.py fetch): 6 engine file(s), 0 kernel(s).
CI checks these bytes against the run's staging manifests.

  src/lib/hrx/inkling2_npu.dll
  src/lib/hrx/inkling2_npu.lib
  src/lib/hrx/libinkling2_npu.so
  src/lib/xrt/inkling2_npu.dll
  src/lib/xrt/inkling2_npu.lib
  src/lib/xrt/libinkling2_npu.so

Devkit-Swap-Run: 45648799322
Devkit-Swap-Tested: 7629711
@tawei-amd

Copy link
Copy Markdown
Collaborator Author

Linux XRT was tested on a bad machine. already taken off from the ci fleet

@tawei-amd
tawei-amd marked this pull request as ready for review November 25, 2026 18:35
@tawei-amd
tawei-amd requested a review from zaneni6 November 25, 2026 18:36
@fastflowlm-devkit-swap-github-app
fastflowlm-devkit-swap-github-app Bot merged commit 8400b17 into main Nov 25, 2026
70 checks passed
@fastflowlm-devkit-swap-github-app

Copy link
Copy Markdown

Dev-kit auto-swap: merged (squash) at swap commit ea30304, which Build and Test run 45671215428 passed (swap commit ea30304 passed run 45671215428; approved at 7629711/ea303046ec by zaneni6).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants