Skip to content

Ci/w2 summary - #106

Merged
jizhenjun merged 17 commits into
mainfrom
ci/w2-summary
Oct 13, 2026
Merged

jizhenjun merged 17 commits into
mainfrom
ci/w2-summary

Conversation

@jizhenjun

Copy link
Copy Markdown
Collaborator

No description provided.

yuki-328 and others added 10 commits October 3, 2026 20:56
The W2 Actions page mixed four per-job report dumps with step outcomes and
scope disclaimers, and still could not answer the three questions it exists
for. Answer them in one place and send the rest to the step log.

* The four per-job summarize steps print to stdout again; the Actions page is
  written once, by the w2-acceptance job. Reporting still never changes a
  probe's exit code.
* scripts/summarize_w2_ci.py renders three tables from the six probe reports:
  which operators each layer supports and which were exercised this run, the
  worst recorded deviation from ORT and NumPy per chain, and the seconds each
  chain took plus a total. A missing or malformed report stays explicit and
  never reads as a pass; the script always exits 0.
* The operator lists and the two new files are read with ast, so the job needs
  no dependencies beyond the standard library and probes.numeric_summary.
* scripts/ci_scopes.json routes a PR that only touches the new script through
  the LLM checks.

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

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

🤖 AI Code Review

共审查 10 个变更文件
⚠️ 另有 16 个文件超过上限(最多 10 个)未审查

📁 CONTRIBUTING.md

🔴 Scope: CONTRIBUTING.md is not the right home for deployment contracts
This file defines how contributors submit work. Embedding platform-pinned acceptance criteria and "historical measurement" policy here conflates contribution process with deployment/release governance. Contributors evaluating this will find irrelevant constraints. The referenced LINUX_REPRODUCTION.md contract belongs in a release/deployment doc; CONTRIBUTING.md should link to it, not restate its substance.

🟡 Overly prescriptive without versioning strategy
"Ubuntu 24.04, Python 3.12" are pinned to point releases. No guidance on when/how these pins are updated (e.g., "upgrade in Q3 2026"). Future contributors will find stale pins with no ownership or update path. Consider: "Pinned to the versions in .python-version and .container/Dockerfile.base; update those files together."

🟡 "Personal development environments are not acceptance evidence" is unclear and unenforceable
This is a policy assertion with no enforcement mechanism or definition of "acceptance evidence." What counts instead? CI runs? A specific harness? Without a testable definition this will generate ambiguity, not compliance.

🟡 Vague forward reference: "W1 and later"
Contributors have no way to know what W1 means without another document. Either define it inline or link directly to the W1 definition.

💭 Tone
"preserved the actual platform and commit identity of historical measurements" reads like a compliance memo. CONTRIBUTING.md tone elsewhere is pragmatic ("why not what"). Align the register.


📁 benchmarks/test_regalloc/regalloc.md

🟡 Suggestion: bench_cnn backslash continuation — The trailing \ on bench_cnn \ with the continuation line starting with spaces is valid Bash, but if anyone copies this into PowerShell (the original target) it will break. Consider adding a one-liner comment like # Linux/Bash right above the code block for clarity, since the doc previously targeted Windows.

🟡 Suggestion: pip install -e ".[all]" — Confirm [all] extra is actually defined in pyproject.toml/setup.cfg. If the project uses src/ layout or the extra isn't wired up, this silently no-ops on the extras part. Worth a quick check.

💭 Nit: output filenames — Changed from generic report.json/html/md to regalloc_bench.*. Nice improvement, but make sure any downstream tooling (dashboards, CI links, docs referencing the old names) is updated too.


📁 docs/CI.md

Review: docs/CI.md (新文件)

🔴 歧义: "跳过都会使总验收失败" — 第6行

"选中的任务失败、取消或跳过都会使总验收失败" 与实际行为可能不一致。GitHub Actions 中 job 被 if 条件跳过时状态为 skipped,若总 gate 对所有 in-scope job 的 skipped 也判失败,需确认实现确实如此;若只是"有明确跳过理由则不算失败",当前措辞会误导维护者在排查时误判。建议明确区分: 无条件的 skipped(逻辑错误)vs. 有条件的 skipped(正常跳过),并说明各自的验收结果。


🟡 缺少可操作链接 — 全文

文档多次引用 scripts/ci_scopes.json、LLM Deploy v1.0、CI acceptance、workflow 名称等,但没有提供任何可点击链接(相对路径或 anchor)。读者需要手动全局搜索才能定位配置。至少应给出:

  • scripts/ci_scopes.json 路径链接
  • .github/workflows/ 下对应 workflow 文件链接

🟡 "不能绕过其失败结果" 缺少执行机制说明 — 第18行

这是策略声明,但文档没有说明如何强制(branch protection rule?CODEOWNERS?required status check?)。如果这是靠人工约定的,应在文档中明确"依赖维护者手动遵守",否则读者会认为有技术强制。


🟡 段落过长,信息密度过高 — 第10、14、18行

单段包含 4–5 个独立语义单元(范围判断、取消旧 CI、Qwen3 IR 排除、W4 默认值、NOT RUN 语义)。建议按主题拆为带标题的短段或列表,便于跳转阅读和后续增量编辑。


💭 无版本/更新标记

纯文档无 Last updated 或关联 PR 链接。CI 行为变更频繁,6 个月后读者无法判断内容是否过时。

💭 "两个工作流" 的表述可更直观 — 第4行

建议加一个一行示例,如 PR #123 → CI acceptance + AI Code Review (2 workflow runs),降低理解成本。


📁 docs/guide/00-环境搭建指南.md

🟡 Scope creep in general guide — The new paragraph ties this general "环境搭建指南" to a specific project (Qwen3 / W1 phases) and defers to LINUX_REPRODUCTION.md for actual requirements. If this guide is shared across projects, the Qwen3-specific disclaimer belongs in the project-specific doc, not here. Consider moving it or making this guide explicitly per-project.

🟡 Removed macOS/Windows sections without redirect — Readers on macOS or Windows lose all guidance with no pointer to alternatives. If those instructions moved elsewhere, add a link. If they're intentionally dropped, state that explicitly ("本指南仅支持 Linux;macOS/Windows 用户请参考 X") so they don't dead-end.

🟡 Unclear terminology — "W1 及后续阶段" and "独立复现" assume internal project context. A first-time reader won't know what W1 means or what "独立复现" refers to. Either define it or link to the definition.

💭 Relative link not verified — ../llm-deploy-v1.0/LINUX_REPRODUCTION.md — confirm this resolves from the guide's location. Broken links in onboarding docs are a silent failure.


📁 docs/guide/04-故障排除FAQ.md

🔴 Bug: 占位符语义变化 — path/to/resolved-file 看起来像一个字面量路径,用户可能直接原样复制执行。<冲突文件>(或英文 <conflict-file>)用尖括号明确标识"这是占位符需替换",更不易误用。建议保留尖括号风格。

💭 Nit: 一致性 — 如果文档其他地方统一用 <中文> 做占位符,此处改成 path/to/... 会显得不一致。


📁 docs/llm-deploy-v1.0/LINUX_REPRODUCTION.md

🟡 Fragile torch version assert — torch.__version__ == "2.7.1+cpu" breaks on any build-string variation (e.g. 2.7.1+cpu.abi1). Consider:

assert torch.__version__.startswith("2.7.1") and torch.version.cuda is None

🟡 Missing explicit Python version check — python3.12 -m venv will fail if python3.12 is absent, but the error is opaque. Add a guard before venv creation:

python3.12 --version  # abort if not 3.12.x

🟡 ziglang path extraction assumes internal layout — Path(ziglang.__file__).parent / "zig" depends on the package bundling zig as a sibling file. If ziglang changes its layout, this silently breaks. Add a post-extraction existence check:

test -x "$SCRATCHV_CC" || { echo "ziglang package layout changed"; exit 1; }

💭 Consider pinning pip — pip install --upgrade pip resolves to whatever is latest today, which can shift reproducibility over time. Pin to pip==24.0 or similar.

💭 Section 4 --check-bash dependency — The doc says CI must run bash syntax checks via check_linux_repro_docs.py --check-bash, but doesn't note this requires that script to exist in the repo at that path. A brief cross-reference or "see scripts/" would help.


📁 docs/llm-deploy-v1.0/W1/IR解释器-使用说明.md

🟡 结构位置 — 新段落插在标题与 metadata block(日期/输入)之间,视觉上像是对标题的注释而非独立的前提说明。建议移到 metadata block 之后,作为独立的「环境要求」小节,或者合并进 blockquote 里,保持文档元信息的一致性。

🟡 激活语义歧义 — "已激活的 .venv-linux/bin/python" 混用了两种模式:激活 venv 后 python 直接可用,无需再走 .venv-linux/bin/python 路径。两种互斥的场景混在一句话里,读者会不确定到底该先 source .venv-linux/bin/activate 还是直接用绝对路径调用。建议二选一并说清楚,例如:

所有命令需在已激活 .venv-linux 的 shell 中执行(source .venv-linux/bin/activate),此时 python 即指 venv 内的解释器。

💭 链接路径 — ../LINUX_REPRODUCTION.md 从 docs/llm-deploy-v1.0/W1/ 出发解析为 docs/llm-deploy-v1.0/LINUX_REPRODUCTION.md,确认该文件确实存在于预期位置,否则链接会 404。


📁 docs/llm-deploy-v1.0/W1/IR解释器-开发文档.md

🔴 Link path correctness — ../LINUX_REPRODUCTION.md resolves to docs/llm-deploy-v1.0/LINUX_REPRODUCTION.md. Confirm this file actually exists at that path; if it lives at repo root (docs/LINUX_REPRODUCTION.md), the link will 404.

🟡 Version inconsistency — Folder is llm-deploy-v1.0/ but doc header says v0.1. Pick one to avoid confusion for readers tracking deliverables.

🟡 Vague tool spec — "Bash" 未指明最低版本。如果脚本用了特定 Bash 特性(如 mapfile、[[ == *pat* ]]),建议标注 Bash ≥ 4.4(Ubuntu 24.04 自带 5.2,但仍值得写明)。

💭 Nit — "本轮实现已落地" 语气偏口语,文档面向 CI/复现场景,可考虑改为 "本轮实现已完成" 或去掉这半句。


📁 docs/llm-deploy-v1.0/W1/IR解释器-设计文档.md

🟡 Suggestion: 相对路径模糊 — ".venv-linux/bin/python" 缺少基准目录说明。读者不知道这个相对路径从项目根目录算还是从当前工作目录算。
建议: "项目根目录下的 .venv-linux/bin/python"

🟡 Suggestion: 段落位置 — 环境前提放在标题与版本元数据之间,会打断文档的惯用 header 结构(title → version → content)。考虑移到版本信息之后,或以独立的"## 环境要求"小节呈现,方便扫读和后续维护。

💭 Nit: 链接可访问性 — ../LINUX_REPRODUCTION.md 请确认该文件实际存在于 docs/llm-deploy-v1.0/ 目录下。文档链接断裂是新手复现时的常见痛点。


(路径中的 v1.0 与文档内标注的 "v0.2 / 第二版" 不一致,属于已有问题,非本次引入。)


📁 docs/llm-deploy-v1.0/W1/README.md

🔴 Bug: venv path hardcoded twice — SCRATCHV_PYTHON="$(pwd)/.venv-linux/bin/python" and the activation line both assume .venv-linux at repo root. If the user runs from a different cwd or uses a different venv name (as the old output/w1-repro-venv allowed), both silently break. Use $VIRTUAL_ENV/bin/python since the venv is already activated.

🔴 Bug: command -v with set -e — export SCRATCHV_QEMU="$(command -v qemu-system-riscv64)" exits silently if QEMU isn't installed (because set -e catches the non-zero return). Add a guard:

command -v qemu-system-riscv64 || { echo "ERROR: qemu-system-riscv64 not found"; exit 1; }

🟡 Suggestion: venv location inconsistency — Old convention was output/w1-repro-venv/ (inside the repo's evidence directory). New .venv-linux/ at root mixes with project files and won't be captured in output/ evidence bundles. Consider output/w1-repro-venv/ or at least document why root-level is intentional.

🟡 Suggestion: missing thread-pinning comment — OMP_NUM_THREADS=1 etc. are critical for reproducible timing/memory, but there's no note explaining they suppress parallelism and must not be removed for performance comparisons.

🟡 Suggestion: REPRO_PR=94 needs a "change me" marker — The prose explains it's an example, but a user copy-pasting will likely not change it. Add a bash comment:

# ⚠️ 改为实际待验收 PR 号,W3 集成用 96
REPRO_PR=94

🟡 Suggestion: removed error-handling guidance is too terse — The old text had explicit PowerShell $LASTEXITCODE / bash $? patterns for downstream commands. The new single-line set -euo pipefail only applies within that one bash block. Subsequent standalone commands in other code blocks have no error handling. Consider either wrapping all blocks with set -euo pipefail or restoring a brief note.

💭 Nit: Title now says "Linux 独立复现" — all Windows references are gone, which is a clean, intentional platform decision. Just confirm the ../LINUX_REPRODUCTION.md link exists in the repo at the target SHA, otherwise this is a dead reference on first reader's clone.



⚠️ 未审查的文件

  • docs/llm-deploy-v1.0/W1/W1-执行计划.md
  • docs/llm-deploy-v1.0/W1/W1-探测方案.md
  • docs/llm-deploy-v1.0/W1/W1-本地收尾与审查报告.md
  • docs/llm-deploy-v1.0/W1/interfaces.md
  • docs/llm-deploy-v1.0/W1/risks.md
  • docs/llm-deploy-v1.0/W1/算子补齐与单测-benchmark.html
  • docs/llm-deploy-v1.0/W1/算子补齐与单测-benchmark.json
  • docs/llm-deploy-v1.0/W1/算子补齐与单测-benchmark.md
  • docs/llm-deploy-v1.0/W1/算子补齐与单测报告.txt
  • docs/llm-deploy-v1.0/W2/README.md
  • docs/llm-deploy-v1.0/W2/W1修复与W2本地验收报告.md
  • docs/llm-deploy-v1.0/W2/W2-分支验收与发布说明.md
  • docs/llm-deploy-v1.0/开发计划.md
  • docs/reference/ARCHITECTURE_DESIGN.md
  • docs/topics/06-性能基准套件/06-性能测试套件使用说明.md
  • docs/topics/06-性能基准套件/06-性能测试套件设计文档.md

jizhenjun and others added 6 commits October 11, 2026 23:17
The status column already says whether the comparisons passed, so
"门槛通过(2/2)" spent a word twice. Say "通过(2/2)" and "未通过(…)"
instead. The empty case stays "未测(0 条比较)".

This table is shared with the W3 summary and the HTML reports, so their
wording follows.

Co-Authored-By: Claude Code <noreply@anthropic.com>
The table said "IR vs ORT" and "QEMU vs NumPy" without saying what those four
are, which left the page readable only to whoever wrote it. Add one line each:
ORT runs the official CPU kernels on the same ONNX model; IR is our frontend's
IR executed by the IR interpreter on the host; QEMU is the same graph compiled
to an RV64 ELF and run in emulation; NumPy is the hand-written formula that
only the operator probe has; the qwen3-small row takes the final checkpoint
named logits.

Co-Authored-By: Claude Code <noreply@anthropic.com>
The Documentation checks job and the docs scope behind it were redundant.
Its `check_linux_repro_docs.py --check-bash` step ran the same command that
llm-deploy already ran, and its pytest step was already covered by the
`pytest tests/` run in the test job.

The check now lives in the test job, which has no path filter, so it runs on
every push and pull request instead of only when the docs scope was selected.
That removes the need for the scope entirely.

- delete .github/workflows/linux-reproduction-docs.yml and the docs job
- drop the duplicated docs:linux-reproduction step from llm-deploy
- select only the llm and w4 scopes, and summarize only jobs that exist

Verified with tests/test_ci_routing.py, tests/test_ci_workflows.py,
tests/test_linux_repro_docs.py, tests/test_w2_actions_summary.py,
tests/test_w2_acceptance_summary.py, tests/test_numeric_summary.py and
tests/test_compare_peephole.py (253 passed).

Co-Authored-By: Claude Code <noreply@anthropic.com>
W2 never executes scratchv/backend/kernels, so a row that lists those files
and then says "not executed" only invites the reader to look for them. The
table now answers for the two layers W2 actually covers.

- remove the kernels row and the now-unused KERNEL_BODIES / kernel_bodies()
- pin the removal in the operator test instead of asserting the row's text

Co-Authored-By: Claude Code <noreply@anthropic.com>
The block restated the step's own outcome, which the run page already shows,
and pointed at an artifact that is listed in the run anyway. The JUnit XML and
the text log are still produced and uploaded.

- delete the "Summarize Topic 04 PassManager results" step and the step id it
  was the only reader of
- pin the job's silence in test_ci_workflows.py

Co-Authored-By: Claude Code <noreply@anthropic.com>
The table restated five step outcomes the run page already shows per step,
under a job named "W1 + W2" while it only covered W1. The block now prints
into the step log, which is where the W2 gate summaries already go.

- drop the last >> "$GITHUB_STEP_SUMMARY" from the W1 + W2 job
- pin the job's silence, leaving full-model validation as the only writer

Co-Authored-By: Claude Code <noreply@anthropic.com>
IR precision now uses ordinary final outputs. Keep missing comparisons in the planned counts and count frontend operators only after successful parsing and IR verification, including backend probe graphs.

Preserve the original operator table labels and note, QEMU comparison scope, model calculations and accuracy thresholds. Add focused regression tests for missing results and parse failures.

Validation: 78 summary tests and 182 probe tests passed; 54 summary tests passed again after restoring the original labels. Existing CI reports render with unchanged IR and QEMU precision values.
@jizhenjun
jizhenjun merged commit 24895c7 into main Oct 13, 2026
11 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.

3 participants