[Docs] Add the manifest and kernel dispatch user guides, and polish the site's prose - #60
Merged
Conversation
…he site's prose The manifest guide and the kernel dispatch guide were written and reviewed in TileOpsGov. They move here under docs/user-guide/, Chinese first with English translations, with figure sources and a render script under figures/user-guide/. The old manifest page is replaced by the new guide. The kernel selection part of the new-op page and the three ways of the backends page now link to the dispatch guide instead of repeating it. The remaining Chinese pages are polished to the guides' style and terminology (op, family, kernel interface, in-tree implementation, backend), and the English pages are then aligned with the Chinese and polished.
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The 67-file documentation rewrite embeds numerous upstream API contracts that warrant final domain-owner verification.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds comprehensive bilingual manifest and kernel-dispatch guides while consolidating duplicated documentation and standardizing terminology.
Changes:
- Adds nine English/Chinese guide pages with localized diagrams.
- Replaces the legacy manifest guide and links related pages to the new guides.
- Polishes existing prose, navigation, and authoring conventions.
| File | Description |
|---|---|
CLAUDE.md |
Records bilingual terminology and figure rules. |
docs/api/index.md |
Updates the manifest-guide link. |
docs/backends.md |
Condenses dispatch integration guidance. |
docs/backends.zh.md |
Aligns Chinese backend guidance and terminology. |
docs/index.md |
Polishes the English landing page. |
docs/index.zh.md |
Polishes the Chinese landing page. |
docs/manifest.md |
Removes the superseded English guide. |
docs/manifest.zh.md |
Removes the superseded Chinese guide. |
docs/new-op.md |
Links to the new dispatch and manifest guides. |
docs/new-op.zh.md |
Aligns the Chinese new-op workflow. |
docs/performance-guides/index.md |
Polishes performance-guide prose. |
docs/performance-guides/index.zh.md |
Standardizes Chinese terminology. |
docs/performance-guides/memory-bound/global-memory-access.md |
Clarifies global-memory guidance. |
docs/performance-guides/memory-bound/global-memory-access.zh.md |
Aligns the Chinese global-memory guide. |
docs/performance-guides/memory-bound/index.md |
Clarifies the roofline introduction. |
docs/performance-guides/memory-bound/index.zh.md |
Aligns the Chinese roofline introduction. |
docs/performance-guides/memory-bound/shared-memory-access.md |
Polishes shared-memory guidance. |
docs/performance-guides/memory-bound/shared-memory-access.zh.md |
Aligns the Chinese shared-memory guide. |
docs/timing.md |
Clarifies benchmark timing behavior. |
docs/timing.zh.md |
Aligns the Chinese timing guide. |
docs/torch-compile.md |
Polishes compile-boundary guidance. |
docs/torch-compile.zh.md |
Aligns Chinese compile terminology. |
docs/user-guide/dispatch/backends.md |
Documents backend dispatch extension points. |
docs/user-guide/dispatch/backends.zh.md |
Adds the Chinese backend-dispatch guide. |
docs/user-guide/dispatch/img/call.svg |
Adds the English dispatch-flow figure. |
docs/user-guide/dispatch/img/call.zh.svg |
Adds the Chinese dispatch-flow figure. |
docs/user-guide/dispatch/img/extension.svg |
Adds the English extension figure. |
docs/user-guide/dispatch/img/extension.zh.svg |
Adds the Chinese extension figure. |
docs/user-guide/dispatch/index.md |
Introduces kernel dispatch concepts. |
docs/user-guide/dispatch/index.zh.md |
Adds the Chinese dispatch overview. |
docs/user-guide/dispatch/writing.md |
Documents adding kernel implementations. |
docs/user-guide/dispatch/writing.zh.md |
Adds the Chinese kernel-writing guide. |
docs/user-guide/index.md |
Adds the new guides to the index. |
docs/user-guide/index.zh.md |
Updates the Chinese guide index. |
docs/user-guide/manifest/calls.md |
Documents calls and validation. |
docs/user-guide/manifest/calls.zh.md |
Adds Chinese call-validation guidance. |
docs/user-guide/manifest/concepts.md |
Explains manifest type concepts. |
docs/user-guide/manifest/concepts.zh.md |
Adds the Chinese concepts guide. |
docs/user-guide/manifest/examples.md |
Adds representative manifest examples. |
docs/user-guide/manifest/examples.zh.md |
Adds Chinese manifest examples. |
docs/user-guide/manifest/extensions.md |
Documents advanced manifest forms. |
docs/user-guide/manifest/extensions.zh.md |
Adds Chinese extension guidance. |
docs/user-guide/manifest/img/call.svg |
Adds the English call-path figure. |
docs/user-guide/manifest/img/call.zh.svg |
Adds the Chinese call-path figure. |
docs/user-guide/manifest/img/device.svg |
Adds the English device-selection figure. |
docs/user-guide/manifest/img/device.zh.svg |
Adds the Chinese device-selection figure. |
docs/user-guide/manifest/img/new-op.svg |
Adds the English new-op workflow figure. |
docs/user-guide/manifest/img/new-op.zh.svg |
Adds the Chinese new-op workflow figure. |
docs/user-guide/manifest/img/overview.svg |
Adds the English system overview. |
docs/user-guide/manifest/img/overview.zh.svg |
Adds the Chinese system overview. |
docs/user-guide/manifest/index.md |
Adds the main English manifest guide. |
docs/user-guide/manifest/index.zh.md |
Adds the main Chinese manifest guide. |
docs/user-guide/manifest/writing.md |
Documents core spec fields. |
docs/user-guide/manifest/writing.zh.md |
Adds Chinese spec-writing guidance. |
figures/user-guide/dispatch/call.en.puml |
Sources the English dispatch-flow figure. |
figures/user-guide/dispatch/call.zh.puml |
Sources the Chinese dispatch-flow figure. |
figures/user-guide/dispatch/extension.en.puml |
Sources the English extension figure. |
figures/user-guide/dispatch/extension.zh.puml |
Sources the Chinese extension figure. |
figures/user-guide/manifest/call.en.puml |
Sources the English call-path figure. |
figures/user-guide/manifest/call.zh.puml |
Sources the Chinese call-path figure. |
figures/user-guide/manifest/device.en.puml |
Sources the English device figure. |
figures/user-guide/manifest/device.zh.puml |
Sources the Chinese device figure. |
figures/user-guide/manifest/new-op.en.puml |
Sources the English workflow figure. |
figures/user-guide/manifest/new-op.zh.puml |
Sources the Chinese workflow figure. |
figures/user-guide/manifest/overview.py |
Generates both overview SVGs. |
figures/user-guide/render.sh |
Reproducibly renders localized figures. |
mkdocs.yml |
Adds guide navigation and translations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+172
to
+175
| # 每个装好的 backend在 import 时都往注册表里放了一个 detect。op 层把 a.device | ||
| # 这一个对象原样交给每个 detect,问「这块设备是不是你这套 kernel 的」: | ||
| # acme 的 detect(device) → True 其他后端的 → False | ||
| # 恰好一个返回 True → target = "acme",这个算子实例此后固定用它 | ||
| # acme 的 detect(device) → True 其他 backend的 → False | ||
| # 恰好一个返回 True → target = "acme",这个op 实例此后固定用它 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problems
manifestrepeats the manifest guide in an older form.new-op(kernel selection) andbackends(three ways in) repeat the dispatch guide.Changes
user-guide/manifest/(6 pages) anduser-guide/dispatch/(3 pages), Chinese-authored with English translations. Figures are rendered asimg/<name>.svgandimg/<name>.zh.svg. Their sources andrender.share underfigures/user-guide/.manifest.md. Shorten the kernel-selection section ofnew-opand the three-ways section ofbackends, and link both to the dispatch guide.CLAUDE.md.mkdocs buildreports onlygriffe:warnings.pytest,ruffandcheck_api_pages.pypass.