Skip to content

fix(Hy_MT2): the stack check fails instead of skipping what it cannot read - #1114

Merged
zaneni6 merged 3 commits into
mainfrom
fix/hymt2-stack-check-fails-loudly
Nov 23, 2026
Merged

zaneni6 merged 3 commits into
mainfrom
fix/hymt2-stack-check-fails-loudly

Conversation

@zaneni6

@zaneni6 zaneni6 commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Hy_MT2's check_peano_stack.sh skipped a core, and so passed, whenever it could not work something out. #1085 made the other three copies of this check fail on all of these; this one was left out.

Case Before After
stack_depth.py fails (objdump error, recursion, traceback) empty output read as "no stack": skipped error
disassembly with no function stack_depth.py printed nothing: skipped error (stack_depth.py exits non-zero)
no _sp_start_value_DM_stack, or no buffer above it warning, skipped error
ELF missing skipped error
no ELF arguments did nothing error
fits / ≥95% / overflows pass / warn / fail unchanged

It still uses stack_depth.py for the deepest call chain (more precise than the frame sum the other copies use).

Testing

  • A fake llvm-objdump / llvm-nm in WSL drove each row above; each gives the result in the table (overflow: "stack frames total 4128 B but only 4096 B of stack").
  • The latest main build of Hy_MT2_1.8B/decoding logged no warning or traceback from the check.

First real run of the staged-build flow

This changes kernel build inputs, so it is the first PR to go through the flow from #1092 end to end: devkit-xclbins rebuilds the Hy_MT2 decoding kernels, devkit-stage stages them into the product builds, the NPU tests and the bench run on them, and summary should stop at Dev-kit swap pending. The swap commit (devkit_swap.py fetch) follows once everything else has passed, and CI then only verifies its hashes.

🤖 Generated with Claude Code

… read

Hy_MT2's check_peano_stack.sh skipped a core, and so passed, whenever it
could not work something out: a stack_depth.py failure (objdump error,
recursion, a traceback) left its output empty, which the script read as
"no stack"; a disassembly without functions printed nothing; missing
_sp_start_value_DM_stack or no buffer above it only warned; a missing
ELF was skipped. The other three copies of the check were made to fail
on all of these; this one now does the same, still using stack_depth.py
for the deepest call chain. stack_depth.py exits with an error when it
finds no function instead of printing nothing.

Checked with a fake llvm-objdump/llvm-nm in WSL: fits, 97% (warns),
overflow, stack_depth.py failure, no functions, no stack start, no
bounding buffer, missing ELF and no arguments each give the right
result.

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

github-actions Bot commented Nov 23, 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.

…-fails-loudly

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

Copy link
Copy Markdown

Dev-kit bench

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

Summary
## Dev-kit bench (pr) on `3e75198183`

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) |
|---|---|---|---|---|---|---|---|
| hy-mt2-flash:1.8b | ryzenai-npu4 | 1k | — → 41.8 | — | — → 1624.3 | — | no baseline for this kind |

#### GSM8K accuracy (%)

| Model | Nightly baseline | This run | Δ (points) | Notes |
|---|---|---|---|---|
| hy-mt2-flash:1.8b | — | 52.0 | — |  |

### 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) |
|---|---|---|---|---|---|---|---|
| hy-mt2-flash:1.8b | strix | 1k | — → 38.7 | — | — → 1390.0 | — | no baseline for this kind |

#### GSM8K accuracy (%)

| Model | Nightly baseline | This run | Δ (points) | Notes |
|---|---|---|---|---|
| hy-mt2-flash:1.8b | — | 52.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 45212170212 built from
3e75198, staged into its product builds and tested on the NPU
(devkit_swap.py fetch): 0 engine file(s), 1 kernel(s).
CI checks these bytes against the run's staging manifests.

  src/xclbins/Hy-MT2-1.8B-NPU2/layer.xclbin

Devkit-Swap-Run: 45212170212
Devkit-Swap-Tested: 3e75198
Co-Authored-By: Claude <noreply@anthropic.com>
@zaneni6
zaneni6 marked this pull request as ready for review November 23, 2026 17:10
@zaneni6
zaneni6 merged commit bb5acee into main Nov 23, 2026
62 checks passed
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.

1 participant