Skip to content

docs(user): add task-oriented feature handbook and overview - #2165

Open
YunjiQin wants to merge 1 commit into
hw-native-sys:mainfrom
YunjiQin:docs/user-feature-handbook
Open

docs(user): add task-oriented feature handbook and overview#2165
YunjiQin wants to merge 1 commit into
hw-native-sys:mainfrom
YunjiQin:docs/user-feature-handbook

Conversation

@YunjiQin

@YunjiQin YunjiQin commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a user-facing documentation structure under docs/{en,zh-cn}/user/ — an overview plus a task-oriented feature handbook — addressing the three pillars in #2126 and the reference scaffolding in #2120.

English is authoritative with a zh-cn mirror (EN/ZH parity checked).

Directory Structure

docs/zh-cn/user/ mirrors this tree 1:1.

docs/en/user/
├── 00-overview.md              # design + execution model + master TOC
├── 01-getting_started.md       # (renamed from 00)
├── 02-language_guide.md        # (renamed from 01)
├── 03-operation_reference.md   # (renamed from 02)
├── handbook/
│   ├── 00-index.md             # symptom → tool index
│   ├── precision/
│   │   ├── 00-workflow.md
│   │   ├── 01-torch-golden.md  # (moved from 03-torch_codegen_debug.md)
│   │   ├── 02-pass-ir-bisection.md
│   │   └── 03-selective-dump.md
│   ├── perf/
│   │   ├── 00-workflow.md       # in-core vs inter-core axis
│   │   ├── 01-loop-pipeline.md
│   │   ├── 02-split-parallel.md # mixed kernel + SPMD
│   │   ├── 03-dependency-dispatch.md
│   │   ├── 04-memory-placement.md
│   │   └── 05-measuring-impact.md
│   └── dfx/
│       ├── 00-flag-matrix.md
│       ├── 01-swimlane.md
│       ├── 02-diagnostics-render.md
│       ├── 03-replay.md
│       └── 04-logging.md
├── distributed/
│   └── 00-guide.md             # multi-card pld.* family
├── api-reference/
│   └── index.md                # scaffolding for #2120 generated reference
├── troubleshooting.md
└── glossary.md

Testing

  • Docs-only change (Markdown); pre-commit passed (headers, english-only, en-zh parity, markdownlint).
  • Internal relative links verified (0 broken); newly authored files within the 500-line doc limit.
  • N/A — no code changed, so no build/unit tests apply.

Related Issues

Addresses #2126 (feature handbook) and lays the api-reference/ groundwork for #2120; documents the #2058 WAR-dependency workaround.

Introduce a user-facing documentation structure under docs/{en,zh-cn}/user/
covering the three pillars requested in hw-native-sys#2126 (precision localization,
performance-tuning syntax, DFX features) plus an overview and reference
scaffolding for hw-native-sys#2120.

- 00-overview.md: design philosophy, execution model (with diagram), memory
  hierarchy, compilation pipeline, feature map, and a master documentation TOC.
- handbook/: symptom-to-tool index; precision (torch-golden / pass-IR bisection
  / selective dump, incl. the lost-WAR-dependency gotcha, hw-native-sys#2058); perf, grouped
  by in-core vs inter-core axis (loop/pipeline, mixed kernel, dependency &
  dispatch, memory placement, measuring impact incl. benchmark & swimlane); dfx
  (flag matrix, swimlane, diagnostics render, replay, logging).
- distributed/, api-reference/, troubleshooting.md, glossary.md scaffolding.
- Renumber existing user docs to free 00 for the overview; move the standalone
  torch-codegen debug guide into handbook/precision/; fix affected cross-links
  in dev/language docs.

English is authoritative with a zh-cn mirror.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR expands bilingual PyPTO documentation with new overview and operation-reference pages, reorganized navigation, precision-localization workflows, performance-tuning guidance, DFX documentation, distributed-programming outlines, glossaries, and troubleshooting scaffolds.

Changes

PyPTO documentation expansion

Layer / File(s) Summary
User entry points and operation references
docs/{en,zh-cn}/user/00-overview.md, docs/{en,zh-cn}/user/03-operation_reference.md, docs/{en,zh-cn}/user/api-reference/*, docs/{en,zh-cn}/dev/language/*, docs/{en,zh-cn}/user/01-getting_started.md, docs/{en,zh-cn}/user/02-language_guide.md
Adds bilingual overview and comprehensive operation-reference content, introduces API-reference drafts, and updates links to renamed documentation pages.
Precision localization workflows
docs/{en,zh-cn}/user/handbook/precision/*
Documents torch-codegen validation, pass-IR bisection, selective tensor dumping, and a WAR-dependency diagnosis workflow.
Performance tuning handbook
docs/{en,zh-cn}/user/handbook/perf/*
Adds workflows for measurement, pipelines, split and parallel execution, dependency dispatch, and memory placement.
Handbook navigation and diagnostics
docs/{en,zh-cn}/user/handbook/*, docs/{en,zh-cn}/user/distributed/*, docs/{en,zh-cn}/user/glossary.md, docs/{en,zh-cn}/user/troubleshooting.md
Adds handbook indexes and draft pages for DFX, distributed execution, terminology, and troubleshooting.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

  • #2126 — The PR adds the proposed bilingual precision, performance-tuning, and DFX feature handbook content.

Poem

I hop through guides both wide and bright,
With tiles and tensors lined just right.
New paths bloom where readers roam,
From DFX lanes to kernels’ home.
“Drafts today!” the rabbit sings,
While links grow useful little wings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: adding a task-oriented user feature handbook and overview docs.
Description check ✅ Passed The description accurately matches the documentation restructure, handbook content, mirrors, and cross-link updates.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6635bd1323

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

from pypto.runtime import benchmark

stats = benchmark(compiled, args, rounds=100, warmup=3)
print(stats.device_us_mean(), stats.device_us_median(), stats.device_us_stdev())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove calls from BenchmarkStats properties

In this newly added benchmark example, device_us_mean, device_us_median, and device_us_stdev are @property accessors on BenchmarkStats, not methods, so copying the snippet will fail with a 'float' object is not callable TypeError after the first access. Please show these as stats.device_us_mean, etc., and mirror the same fix in the zh-cn page. .claude/rules/documentation.mdL104-L109

Useful? React with 👍 / 👎.

## 逐步操作

1. **建立黄金值。** 构造输入与参考输出(如一个 torch 函数)。
[章节 01](01-torch-golden.md#build-inputs-and-golden-output) 有一份完整的

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace English anchors in Chinese workflow

These Chinese workflow links use English heading fragments (#build-inputs-and-golden-output, #1-codegen-directly-from-program-ir, and #2-codegen-after-passmanagerdefault), but the target zh-cn page has translated headings, so the anchors do not exist and readers land at the wrong place when following the steps. Please use the localized fragments or add explicit stable anchors for all three links. .claude/rules/documentation.mdL89-L96

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/en/user/handbook/perf/01-loop-pipeline.md (1)

42-45: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use in-core profiling to verify pipeline overlap. Mixed C→V→C pipelining occurs inside one task and is not observable in the per-task swimlane.

  • docs/en/user/handbook/perf/01-loop-pipeline.md#L42-L45: point verification to in-core profiling; use the swimlane for inter-task/SPMD effects.
  • docs/zh-cn/user/handbook/perf/01-loop-pipeline.md#L38-L40: apply the same verification distinction in the Chinese mirror.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/user/handbook/perf/01-loop-pipeline.md` around lines 42 - 45, Update
the “Verifying the effect” section in
docs/en/user/handbook/perf/01-loop-pipeline.md at lines 42-45 to direct readers
to in-core profiling for mixed C→V→C pipeline overlap, while retaining the
Swimlane link for inter-task/SPMD effects. Apply the same verification
distinction in docs/zh-cn/user/handbook/perf/01-loop-pipeline.md at lines 38-40.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/en/user/00-overview.md`:
- Around line 117-121: Add the BackendType import to the overview compile
examples so the existing BackendType.Ascend910B references resolve when copied.
Update both docs/en/user/00-overview.md (lines 117-121) and
docs/zh-cn/user/00-overview.md (lines 101-105) by importing BackendType from
pypto.backend or qualifying the reference consistently.

In `@docs/en/user/handbook/perf/05-measuring-impact.md`:
- Around line 33-39: Clarify the introductory Compile-Time Profiling
descriptions so ir.compile(profiling=True) is documented as recording
compilation stages only, excluding device execution; note that device_execution
is available through runtime.run(..., compile_profiling=True). Apply the
correction in docs/en/user/handbook/perf/05-measuring-impact.md lines 33-39 and
mirror the equivalent correction in Chinese in
docs/zh-cn/user/handbook/perf/05-measuring-impact.md lines 29-33.

In `@docs/en/user/handbook/precision/01-torch-golden.md`:
- Around line 94-109: Make both handbook versions generic rather than presenting
Qwen3 test values as universal: in
docs/en/user/handbook/precision/01-torch-golden.md lines 94-109 and
docs/zh-cn/user/handbook/precision/01-torch-golden.md lines 94-109, make the
generated entry-point lookup configurable; in lines 131-147 of both files,
remove or explicitly qualify cross-core assertions; and in lines 159-166 of both
files, replace the fixed Qwen3 dump path and "out" key with configurable
placeholders or clearly documented substitutions.

In `@docs/zh-cn/user/03-operation_reference.md`:
- Around line 23-25: Update the unified and Tensor operation tables in
03-operation_reference.md to match the Tile API by adding entries for minimum
and row_min when their dispatchers exist; otherwise explicitly mark both
operations as Tile-only. Preserve the existing table format and descriptions
used for the corresponding maximum and reduction operations.

---

Outside diff comments:
In `@docs/en/user/handbook/perf/01-loop-pipeline.md`:
- Around line 42-45: Update the “Verifying the effect” section in
docs/en/user/handbook/perf/01-loop-pipeline.md at lines 42-45 to direct readers
to in-core profiling for mixed C→V→C pipeline overlap, while retaining the
Swimlane link for inter-task/SPMD effects. Apply the same verification
distinction in docs/zh-cn/user/handbook/perf/01-loop-pipeline.md at lines 38-40.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f1c5d3b-4163-408a-9c80-879988da9212

📥 Commits

Reviewing files that changed from the base of the PR and between 525f1b6 and 6635bd1.

📒 Files selected for processing (50)
  • docs/en/dev/language/00-python_syntax.md
  • docs/en/user/00-overview.md
  • docs/en/user/01-getting_started.md
  • docs/en/user/02-language_guide.md
  • docs/en/user/03-operation_reference.md
  • docs/en/user/api-reference/index.md
  • docs/en/user/distributed/00-guide.md
  • docs/en/user/glossary.md
  • docs/en/user/handbook/00-index.md
  • docs/en/user/handbook/dfx/00-flag-matrix.md
  • docs/en/user/handbook/dfx/01-swimlane.md
  • docs/en/user/handbook/dfx/02-diagnostics-render.md
  • docs/en/user/handbook/dfx/03-replay.md
  • docs/en/user/handbook/dfx/04-logging.md
  • docs/en/user/handbook/perf/00-workflow.md
  • docs/en/user/handbook/perf/01-loop-pipeline.md
  • docs/en/user/handbook/perf/02-split-parallel.md
  • docs/en/user/handbook/perf/03-dependency-dispatch.md
  • docs/en/user/handbook/perf/04-memory-placement.md
  • docs/en/user/handbook/perf/05-measuring-impact.md
  • docs/en/user/handbook/precision/00-workflow.md
  • docs/en/user/handbook/precision/01-torch-golden.md
  • docs/en/user/handbook/precision/02-pass-ir-bisection.md
  • docs/en/user/handbook/precision/03-selective-dump.md
  • docs/en/user/troubleshooting.md
  • docs/zh-cn/dev/language/00-python_syntax.md
  • docs/zh-cn/user/00-overview.md
  • docs/zh-cn/user/01-getting_started.md
  • docs/zh-cn/user/02-language_guide.md
  • docs/zh-cn/user/03-operation_reference.md
  • docs/zh-cn/user/api-reference/index.md
  • docs/zh-cn/user/distributed/00-guide.md
  • docs/zh-cn/user/glossary.md
  • docs/zh-cn/user/handbook/00-index.md
  • docs/zh-cn/user/handbook/dfx/00-flag-matrix.md
  • docs/zh-cn/user/handbook/dfx/01-swimlane.md
  • docs/zh-cn/user/handbook/dfx/02-diagnostics-render.md
  • docs/zh-cn/user/handbook/dfx/03-replay.md
  • docs/zh-cn/user/handbook/dfx/04-logging.md
  • docs/zh-cn/user/handbook/perf/00-workflow.md
  • docs/zh-cn/user/handbook/perf/01-loop-pipeline.md
  • docs/zh-cn/user/handbook/perf/02-split-parallel.md
  • docs/zh-cn/user/handbook/perf/03-dependency-dispatch.md
  • docs/zh-cn/user/handbook/perf/04-memory-placement.md
  • docs/zh-cn/user/handbook/perf/05-measuring-impact.md
  • docs/zh-cn/user/handbook/precision/00-workflow.md
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md
  • docs/zh-cn/user/handbook/precision/02-pass-ir-bisection.md
  • docs/zh-cn/user/handbook/precision/03-selective-dump.md
  • docs/zh-cn/user/troubleshooting.md

Comment on lines +117 to +121
You trigger the whole pipeline with a single call:

```python
output_dir = ir.compile(MyProgram, backend_type=BackendType.Ascend910B)
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== docs snippets =="
for f in docs/en/user/00-overview.md docs/zh-cn/user/00-overview.md; do
  echo "--- $f"
  nl -ba "$f" | sed -n '88,130p'
done

echo
echo "== BackendType definitions/usages in codebase =="
rg -n "class BackendType|enum BackendType|BackendType|backend_type" . --glob '!docs' --glob '!**/*.png' --glob '!**/*.pdf' | head -n 200

echo
echo "== likely ir.py/module definitions =="
fd -a '^ir\.(py|pyi)$|backend|compiler|compile' . | sed 's#^\./##' | head -n 200

Repository: hw-native-sys/pypto

Length of output: 249


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== docs snippets =="
for f in docs/en/user/00-overview.md docs/zh-cn/user/00-overview.md; do
  echo "--- $f"
  sed -n '88,130=' "$f"
  sed -n '88,130p' "$f"
done

echo
echo "== BackendType definitions/usages in codebase =="
rg -n "class BackendType|enum BackendType|BackendType|backend_type" . --glob '!docs' --glob '!**/*.png' --glob '!**/*.pdf' | head -n 200 || true

echo
echo "== likely ir.py/module definitions =="
find . \( -path './docs' -o -path './.git' \) -prune -o \( -name 'ir.py' -o -name 'ir.pyi' -o -name '*backend*' -o -name '*compiler*' -o -name '*compile*' \) -print | sed 's#^\./##' | head -n 200

Repository: hw-native-sys/pypto

Length of output: 26442


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== backend init signature =="
cat -n python/pypto/backend/__init__.py | sed -n '1,70p'

echo
echo "== pypto_core backend stub =="
cat -n python/pypto/pypto_core/backend.pyi | sed -n '1,35p'

echo
echo "== surrounding imports in overview examples =="
sed -n '1,90p' docs/en/user/00-overview.md
echo
sed -n '1,90p' docs/zh-cn/user/00-overview.md

echo
echo "== pypto public imports exposing BackendType =="
rg -n "^from pypto import |from pypto\\.__init__ import |\\bBackendType\\b" python/pypto --glob '*.py' python/bindings --glob '*.cpp' tests/ut/conftest.py examples/models/04_paged_attention.py | head -n 120

Repository: hw-native-sys/pypto

Length of output: 15333


Fix the overview compile examples’ BackendType imports.

The snippets call ir.compile(..., backend_type=BackendType.Ascend910B) but only import pl and ir, so copy-pasted examples fail with NameError. Add from pypto.backend import BackendType or qualify the same import in both English and Chinese overview examples.

📍 Affects 2 files
  • docs/en/user/00-overview.md#L117-L121 (this comment)
  • docs/zh-cn/user/00-overview.md#L101-L105
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/user/00-overview.md` around lines 117 - 121, Add the BackendType
import to the overview compile examples so the existing BackendType.Ascend910B
references resolve when copied. Update both docs/en/user/00-overview.md (lines
117-121) and docs/zh-cn/user/00-overview.md (lines 101-105) by importing
BackendType from pypto.backend or qualifying the reference consistently.

Comment on lines +33 to +39
## Compile-Time Profiling

Records **compilation** wall-clock at each pipeline stage — frontend parse,
passes (per-pass), codegen (per-kernel + orchestration), and on-device
execution. Use it to answer *"why is compiling slow"* and *"which pass dominates
compile time"*, not to measure a kernel's on-chip speed (for that, use in-core
profiling and the swimlane below).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not conflate compile-time profiling with device execution. ir.compile(profiling=True) records compilation stages only; device_execution is included through runtime.run(..., compile_profiling=True).

  • docs/en/user/handbook/perf/05-measuring-impact.md#L33-L39: revise the introductory description.
  • docs/zh-cn/user/handbook/perf/05-measuring-impact.md#L29-L33: mirror the same correction in Chinese.
📍 Affects 2 files
  • docs/en/user/handbook/perf/05-measuring-impact.md#L33-L39 (this comment)
  • docs/zh-cn/user/handbook/perf/05-measuring-impact.md#L29-L33
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/user/handbook/perf/05-measuring-impact.md` around lines 33 - 39,
Clarify the introductory Compile-Time Profiling descriptions so
ir.compile(profiling=True) is documented as recording compilation stages only,
excluding device execution; note that device_execution is available through
runtime.run(..., compile_profiling=True). Apply the correction in
docs/en/user/handbook/perf/05-measuring-impact.md lines 33-39 and mirror the
equivalent correction in Chinese in
docs/zh-cn/user/handbook/perf/05-measuring-impact.md lines 29-33.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/en/user/handbook/perf/01-loop-pipeline.md (1)

42-45: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use in-core profiling to verify pipeline overlap. Mixed C→V→C pipelining occurs inside one task and is not observable in the per-task swimlane.

  • docs/en/user/handbook/perf/01-loop-pipeline.md#L42-L45: point verification to in-core profiling; use the swimlane for inter-task/SPMD effects.
  • docs/zh-cn/user/handbook/perf/01-loop-pipeline.md#L38-L40: apply the same verification distinction in the Chinese mirror.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/user/handbook/perf/01-loop-pipeline.md` around lines 42 - 45, Update
the “Verifying the effect” section in
docs/en/user/handbook/perf/01-loop-pipeline.md at lines 42-45 to direct readers
to in-core profiling for mixed C→V→C pipeline overlap, while retaining the
Swimlane link for inter-task/SPMD effects. Apply the same verification
distinction in docs/zh-cn/user/handbook/perf/01-loop-pipeline.md at lines 38-40.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/en/user/00-overview.md`:
- Around line 117-121: Add the BackendType import to the overview compile
examples so the existing BackendType.Ascend910B references resolve when copied.
Update both docs/en/user/00-overview.md (lines 117-121) and
docs/zh-cn/user/00-overview.md (lines 101-105) by importing BackendType from
pypto.backend or qualifying the reference consistently.

In `@docs/en/user/handbook/perf/05-measuring-impact.md`:
- Around line 33-39: Clarify the introductory Compile-Time Profiling
descriptions so ir.compile(profiling=True) is documented as recording
compilation stages only, excluding device execution; note that device_execution
is available through runtime.run(..., compile_profiling=True). Apply the
correction in docs/en/user/handbook/perf/05-measuring-impact.md lines 33-39 and
mirror the equivalent correction in Chinese in
docs/zh-cn/user/handbook/perf/05-measuring-impact.md lines 29-33.

In `@docs/en/user/handbook/precision/01-torch-golden.md`:
- Around line 94-109: Make both handbook versions generic rather than presenting
Qwen3 test values as universal: in
docs/en/user/handbook/precision/01-torch-golden.md lines 94-109 and
docs/zh-cn/user/handbook/precision/01-torch-golden.md lines 94-109, make the
generated entry-point lookup configurable; in lines 131-147 of both files,
remove or explicitly qualify cross-core assertions; and in lines 159-166 of both
files, replace the fixed Qwen3 dump path and "out" key with configurable
placeholders or clearly documented substitutions.

In `@docs/zh-cn/user/03-operation_reference.md`:
- Around line 23-25: Update the unified and Tensor operation tables in
03-operation_reference.md to match the Tile API by adding entries for minimum
and row_min when their dispatchers exist; otherwise explicitly mark both
operations as Tile-only. Preserve the existing table format and descriptions
used for the corresponding maximum and reduction operations.

---

Outside diff comments:
In `@docs/en/user/handbook/perf/01-loop-pipeline.md`:
- Around line 42-45: Update the “Verifying the effect” section in
docs/en/user/handbook/perf/01-loop-pipeline.md at lines 42-45 to direct readers
to in-core profiling for mixed C→V→C pipeline overlap, while retaining the
Swimlane link for inter-task/SPMD effects. Apply the same verification
distinction in docs/zh-cn/user/handbook/perf/01-loop-pipeline.md at lines 38-40.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f1c5d3b-4163-408a-9c80-879988da9212

📥 Commits

Reviewing files that changed from the base of the PR and between 525f1b6 and 6635bd1.

📒 Files selected for processing (50)
  • docs/en/dev/language/00-python_syntax.md
  • docs/en/user/00-overview.md
  • docs/en/user/01-getting_started.md
  • docs/en/user/02-language_guide.md
  • docs/en/user/03-operation_reference.md
  • docs/en/user/api-reference/index.md
  • docs/en/user/distributed/00-guide.md
  • docs/en/user/glossary.md
  • docs/en/user/handbook/00-index.md
  • docs/en/user/handbook/dfx/00-flag-matrix.md
  • docs/en/user/handbook/dfx/01-swimlane.md
  • docs/en/user/handbook/dfx/02-diagnostics-render.md
  • docs/en/user/handbook/dfx/03-replay.md
  • docs/en/user/handbook/dfx/04-logging.md
  • docs/en/user/handbook/perf/00-workflow.md
  • docs/en/user/handbook/perf/01-loop-pipeline.md
  • docs/en/user/handbook/perf/02-split-parallel.md
  • docs/en/user/handbook/perf/03-dependency-dispatch.md
  • docs/en/user/handbook/perf/04-memory-placement.md
  • docs/en/user/handbook/perf/05-measuring-impact.md
  • docs/en/user/handbook/precision/00-workflow.md
  • docs/en/user/handbook/precision/01-torch-golden.md
  • docs/en/user/handbook/precision/02-pass-ir-bisection.md
  • docs/en/user/handbook/precision/03-selective-dump.md
  • docs/en/user/troubleshooting.md
  • docs/zh-cn/dev/language/00-python_syntax.md
  • docs/zh-cn/user/00-overview.md
  • docs/zh-cn/user/01-getting_started.md
  • docs/zh-cn/user/02-language_guide.md
  • docs/zh-cn/user/03-operation_reference.md
  • docs/zh-cn/user/api-reference/index.md
  • docs/zh-cn/user/distributed/00-guide.md
  • docs/zh-cn/user/glossary.md
  • docs/zh-cn/user/handbook/00-index.md
  • docs/zh-cn/user/handbook/dfx/00-flag-matrix.md
  • docs/zh-cn/user/handbook/dfx/01-swimlane.md
  • docs/zh-cn/user/handbook/dfx/02-diagnostics-render.md
  • docs/zh-cn/user/handbook/dfx/03-replay.md
  • docs/zh-cn/user/handbook/dfx/04-logging.md
  • docs/zh-cn/user/handbook/perf/00-workflow.md
  • docs/zh-cn/user/handbook/perf/01-loop-pipeline.md
  • docs/zh-cn/user/handbook/perf/02-split-parallel.md
  • docs/zh-cn/user/handbook/perf/03-dependency-dispatch.md
  • docs/zh-cn/user/handbook/perf/04-memory-placement.md
  • docs/zh-cn/user/handbook/perf/05-measuring-impact.md
  • docs/zh-cn/user/handbook/precision/00-workflow.md
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md
  • docs/zh-cn/user/handbook/precision/02-pass-ir-bisection.md
  • docs/zh-cn/user/handbook/precision/03-selective-dump.md
  • docs/zh-cn/user/troubleshooting.md
🛑 Comments failed to post (2)
docs/en/user/handbook/precision/01-torch-golden.md (1)

94-109: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Avoid presenting test-specific values as a generic workflow.

Both language versions hardcode the scope3 entry point, Qwen3 pass-dump path, "out" output key, and cross-core assertions. Parameterize these values or explicitly identify the snippets as Qwen3-specific and document the required substitutions.

  • docs/en/user/handbook/precision/01-torch-golden.md#L94-L109: make the generated entry-point lookup configurable instead of assuming scope3.
  • docs/en/user/handbook/precision/01-torch-golden.md#L131-L147: remove or qualify cross-core assertions that are not valid for every program.
  • docs/en/user/handbook/precision/01-torch-golden.md#L159-L166: replace the fixed Qwen3 path and "out" key with placeholders or configurable values.
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md#L94-L109: mirror the generic entry-point guidance.
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md#L131-L147: mirror the cross-core assertion guidance.
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md#L159-L166: mirror the configurable dump path and output-key guidance.
📍 Affects 2 files
  • docs/en/user/handbook/precision/01-torch-golden.md#L94-L109 (this comment)
  • docs/en/user/handbook/precision/01-torch-golden.md#L131-L147
  • docs/en/user/handbook/precision/01-torch-golden.md#L159-L166
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md#L94-L109
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md#L131-L147
  • docs/zh-cn/user/handbook/precision/01-torch-golden.md#L159-L166
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/en/user/handbook/precision/01-torch-golden.md` around lines 94 - 109,
Make both handbook versions generic rather than presenting Qwen3 test values as
universal: in docs/en/user/handbook/precision/01-torch-golden.md lines 94-109
and docs/zh-cn/user/handbook/precision/01-torch-golden.md lines 94-109, make the
generated entry-point lookup configurable; in lines 131-147 of both files,
remove or explicitly qualify cross-core assertions; and in lines 159-166 of both
files, replace the fixed Qwen3 dump path and "out" key with configurable
placeholders or clearly documented substitutions.
docs/zh-cn/user/03-operation_reference.md (1)

23-25: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the unified and Tensor operation tables consistent with the Tile API.

minimum and row_min are documented for Tiles (Lines 127 and 167) but are absent from the corresponding unified/Tensor tables, while maximum and the other reductions are listed. Add the unified/Tensor entries if those dispatchers exist; otherwise explicitly document that these operations are Tile-only.

Also applies to: 31-38

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/zh-cn/user/03-operation_reference.md` around lines 23 - 25, Update the
unified and Tensor operation tables in 03-operation_reference.md to match the
Tile API by adding entries for minimum and row_min when their dispatchers exist;
otherwise explicitly mark both operations as Tile-only. Preserve the existing
table format and descriptions used for the corresponding maximum and reduction
operations.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant