Closed
[WIP] feat(cannbot): add Stage-5 NPU-measure optimization loop and its measurement-confirmed KB #472
hid22900163Add on Aug 12Closed at Aug 24
[WIP] feat(cannbot): add Stage-5 NPU-measure optimization loop and its measurement-confirmed KB #472
Closed
Merged fromNikita17/pypto-gym_5266stage5-kb-printocann/pypto-gymmaster
The current Pull Request has been closed by hid22900163.
Aug 12 Created pull request, commit 25318cc8
Aug 12 Set as a draft.
Aug 12 Change title to "[WIP] feat(cannbot): add Stage-5 NPU-measure optimization loop and its measurement-confirmed KB", originally titled "feat(cannbot): add Stage-5 NPU-measure optimization loop and its measurement-confirmed KB".
Aug 12 Change title to "[WIP] feat(cannbot): add Stage-5 NPU-measure optimization loop and its measurement-confirmed KB", originally titled "feat(cannbot): add Stage-5 NPU-measure optimization loop and its measurement-confirmed KB".
Aug 24 Close pull request
Was This PR authored or co-authored using generative AI tooling?
[ ] No
[x] Yes
__1. AI Agent : Claude Code, driving the
pypto-pro-op-orchestratorskills in this repo__2. AI Model : claude-opus-5
__3. Prompt : "Add a Stage-5 performance-optimization stage after Stage 4's correctness gate, tune
rms_normon Ascend950PR with it, and write back only what measurement confirmed." Each tuning rungot a brief naming its lever, a pre-registered per-case cohort and an accept/reject rule fixed before
measuring.
What this PR does / why we need it:
Adds Stage 5, an NPU-measure optimization loop that runs after Stage 4's correctness gate, plus
the knowledge base it produced.
pypto-pl-vector-kernel,pypto-pl-cube-bound,pypto-pl-pipe-rooflineDEFAULT_MAX_STAGE4 → 5rms_normartifact those claims were measured onOn
rms_normit moved the hidden-set (80-case) score 86.2283 → 87.4026 (+1.17), taking theoperator from 8th to 2nd on the official leaderboard:
DPACK-N (D | 64)Rowsgrowth/floor rulesRowsclamp at the measured rung optimumEvery step was accepted on a pre-registered per-case cohort against a byte-identical control, never
on a whole-set delta.
Which issue this PR fixes: fixes
Special notes for your reviewer:
1. This stacks on #444 — base is
cd7ed46, the tip ofcann-bench-a5-all, notmaster. Theshared
cannbot-skills/kb/tree this PR edits is #444's contribution;masterhas 0 files under ittoday. Merge after #444.
2. 🔴
PL10will fail every Stage-5 run and needs a one-line fix that is not in this PR.hooks/pypto-pro-op-lint/.../checks/d2_artifact.py:100hardcodes the stage cap:- if max_stage != 4: + if max_stage not in (4, 5):The lint arrived on
masterin18d77c6, after this branch's base, so the file does not existhere and editing it would create an add/add conflict. It should be applied when this branch is
rebased onto post-#444
master.3. Conflict surface this PR owns: 11 files.
state-transition-core.ts(master rewrote it withDEFAULT_MAX_STAGE = 4; this sets 5 — a one-line semantic re-apply, plus its test and hook) and 8doc/registration files. Master's other 226 changed files are #444's to resolve.
Change Type / 改动类型
Testing / 测试信息
Measured on Ascend950PR via the official cann-bench harness; scores above are grader results, not
local numbers. Kernel is bit-identical to the submission that scored 87.4026.
Checklist / 检查清单