docs(user): Add the language and operations chapters (B2) - #2235
docs(user): Add the language and operations chapters (B2)#2235lyfne123 wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4627ed140
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe documentation is reorganized into Language Guide, Operations, and compilation chapters in English and Chinese. Navigation links are updated. A pre-commit hook now runs a symbol coverage lint tool. ChangesDocumentation architecture
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/zh/user/language/02-control-flow.md (1)
167-167: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winRemove the blank line inside the blockquote.
markdownlint-cli2fails withMD028/no-blanks-blockquoteat Line 167. Remove the blank line so the two callouts remain contiguous.Proposed fix
> **致命陷阱:** 一前一后写两次派发并不会让它们有序。如果那个关系没有体现为运行时能看见的缓冲区重叠,就不存在边,两个任务可能重叠执行。结果是一个偶发复现、一上调试器就消失的竞态。请用 `deps=` 把边写出来。 - > **致命陷阱:** 对一个生产者不在 `deps=` 里的张量使用 `predicate=`,读到的是当时恰好在那里的东西。没有任何提示 —— 任务被跳过或不被跳过,取决于陈旧数据。🤖 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/user/language/02-control-flow.md` at line 167, Remove the blank line inside the blockquote around the two callouts in the control-flow documentation, keeping both callouts contiguous so markdownlint rule MD028 passes.Source: Pipeline failures
🤖 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 @.pre-commit-config.yaml:
- Around line 47-49: Update the Python hook configuration for
check_docs_symbol_coverage.py so language_version uses the repository’s exact
supported Python interpreter, such as python3.10, or the shared pre-commit
default if one is defined; do not leave it as the unpinned python3 value.
In `@docs/en/user/index.md`:
- Line 78: Update the “What is not here yet” section in the user documentation
index so the “Tasks, dependencies, manual_scope / submit” row is consistent with
the linked “Scopes and Tasks” chapter: move it out of the unavailable-topics
section or remove it from that list, leaving only genuinely missing topics
there.
In `@docs/en/user/language/00-types.md`:
- Line 180: Update the dependency-risk wording in
docs/en/user/language/00-types.md at lines 180-180 from “A written buffer” to “A
read-write buffer”; update docs/zh/user/language/00-types.md at lines 142-142
from “会被写入的缓冲区” to “读写缓冲区”. Keep the guidance specific to buffers the kernel
both reads and writes, while preserving Out as valid for write-only output.
In `@docs/en/user/language/01-functions.md`:
- Line 70: Update the function-style tables in
docs/en/user/language/01-functions.md at lines 70-70 and
docs/zh/user/language/01-functions.md at lines 58-58 by adding the missing
first-column header and aligning the delimiter pipes with the corresponding
English and Chinese headers; preserve the remaining table columns and content.
In `@docs/en/user/language/03-memory.md`:
- Line 147: Clarify the memory documentation table row for `pl.matmul` by
specifying that the `Left`/`Right` operand restriction applies to tile-level
`pl.matmul`. Keep the tensor-level behavior described earlier, or explicitly
distinguish both supported overloads so the documentation is not contradictory.
In `@docs/en/user/language/04-scopes-and-tasks.md`:
- Line 219: Remove the blank line inside the blockquote around the two
fatal-pitfall paragraphs in the scopes-and-tasks documentation, or prefix that
line with “>” so the blockquote remains continuous and passes
MD028/no-blanks-blockquote.
In `@docs/en/user/ops/00-dispatch.md`:
- Around line 59-63: Update the read/write operation references to use the
tensor-only namespace consistently: keep docs/en/user/ops/00-dispatch.md lines
59-63 as pl.tensor.read / pl.tensor.write, and change
docs/en/user/ops/01-catalog.md line 123 from the generic pl. spelling to
pl.tensor.read / pl.tensor.write. No other operation entries require changes.
In `@docs/en/user/ops/01-catalog.md`:
- Around line 103-105: Replace the placeholder quote descriptions in the
`row_expand_div`/`row_expand_max`/`row_expand_min` and
`col_expand_div`/`col_expand_max`/`col_expand_min` table rows with explicit
descriptions of the broadcast-fused division, maximum, and minimum operations,
preserving the existing descriptions for addition, subtraction, and
multiplication.
In `@docs/zh/user/01-language_guide.md`:
- Line 27: Update the dump_passes entry in the language guide table to document
that the API accepts both bool shorthand and PassDumpLevel, including that True
maps to CONCISE and False maps to NONE; keep the existing dump-directory
behavior description.
- Line 60: Update the compile() documentation statement to describe unsupported
keyword arguments such as skip_ptoas as invalid input that raises an error
during JITFunction.compile() signature binding, rather than saying they are
silently ignored; retain the guidance to pass compilation options through
config=RunConfig(...).
In `@docs/zh/user/index.md`:
- Line 71: Remove the row referencing `language/04-scopes-and-tasks.md` from the
deferred-content table in the user documentation, or relocate it to the
directory/capabilities section so the table contains only topics still excluded
from the user manual.
---
Outside diff comments:
In `@docs/zh/user/language/02-control-flow.md`:
- Line 167: Remove the blank line inside the blockquote around the two callouts
in the control-flow documentation, keeping both callouts contiguous so
markdownlint rule MD028 passes.
🪄 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: de768f8d-f620-4027-8d8e-aad3a471d540
📒 Files selected for processing (39)
.pre-commit-config.yamldocs/en/dev/language/00-python_syntax.mddocs/en/dev/language/index.mddocs/en/index.mddocs/en/user/01-language_guide.mddocs/en/user/02-operation_reference.mddocs/en/user/02-quickstart.mddocs/en/user/03-programming-model.mddocs/en/user/index.mddocs/en/user/language/00-types.mddocs/en/user/language/01-functions.mddocs/en/user/language/02-control-flow.mddocs/en/user/language/03-memory.mddocs/en/user/language/04-scopes-and-tasks.mddocs/en/user/language/05-directives.mddocs/en/user/language/index.mddocs/en/user/ops/00-dispatch.mddocs/en/user/ops/01-catalog.mddocs/en/user/ops/index.mddocs/zh/dev/language/00-python_syntax.mddocs/zh/dev/language/index.mddocs/zh/index.mddocs/zh/user/01-language_guide.mddocs/zh/user/02-operation_reference.mddocs/zh/user/02-quickstart.mddocs/zh/user/03-programming-model.mddocs/zh/user/index.mddocs/zh/user/language/00-types.mddocs/zh/user/language/01-functions.mddocs/zh/user/language/02-control-flow.mddocs/zh/user/language/03-memory.mddocs/zh/user/language/04-scopes-and-tasks.mddocs/zh/user/language/05-directives.mddocs/zh/user/language/index.mddocs/zh/user/ops/00-dispatch.mddocs/zh/user/ops/01-catalog.mddocs/zh/user/ops/index.mdmkdocs.ymltests/lint/check_docs_symbol_coverage.py
💤 Files with no reviewable changes (2)
- docs/en/user/02-operation_reference.md
- docs/zh/user/02-operation_reference.md
markdownlint (CI failure, 8 errors): - MD060: the two-authoring-styles table had an empty first header cell, which cannot align with a `---` delimiter. Gave the column a header (EN+ZH). - MD028: two adjacent fatal-pitfall blockquotes separated by a blank line read as one blockquote with a hole. Merged into a single callout with two bullets (EN+ZH), which also matches the one-callout convention the other pages use. Operator catalog accuracy — each verified against the source: - `sqrt` / `rsqrt` are unified Tensor|Tile dispatchers, so the tile-only (t) marker was wrong. Dropped it, and noted that `high_precision=` is ignored on the tile branch: `pl.tile.rsqrt(src, tmp=...)` is the high-precision path. - `max` / `min` take two scalar-like operands and return a `Scalar`; they are not tile reductions. Described them as scalar combiners and pointed tile reductions at `row_max` / `col_max`. - `matmul_acc` has both Tensor and Tile branches — dropped its (t) marker. - `batch_matmul` raises a dispatch TypeError for Tensor operands. Marked it tile-only and pointed tensor callers at `pl.matmul`. - Replaced the literal `"` ditto marks in the broadcast rows with real text. Cross-page consistency: - `pl.read` / `pl.write` are unified dispatchers accepting Tensor or Tile, so the dispatch guide was wrong to list them as tensor-only. Removed that row rather than changing the catalog, which had it right. - Qualified the memory Edge Case row as tile-level `pl.matmul`, so it no longer appears to contradict the tensor-level lowering described earlier on the page. - Dropped the scopes/tasks row from both "not here yet" tables: that page ships in this PR, so the row pointed into the manual it claimed was missing. Corrected behaviour that was documented wrongly: - An unknown `compile()` keyword is bound against the kernel signature and raises `TypeError: got an unexpected keyword argument`. It is not silently ignored. Verified by running it; fixed in the guide, the functions page, and the debug tables (EN+ZH). - `dump_passes` accepts `bool | PassDumpLevel`, not `PassDumpLevel` alone. - `Out` is correct for a write-only buffer, so the overlap symptom is about a read-write buffer, not "a written buffer".
markdownlint (CI failure, 8 errors): - MD060: the two-authoring-styles table had an empty first header cell, which cannot align with a `---` delimiter. Gave the column a header (EN+ZH). - MD028: two adjacent fatal-pitfall blockquotes separated by a blank line read as one blockquote with a hole. Merged into a single callout with two bullets (EN+ZH), which also matches the one-callout convention the other pages use. Operator catalog accuracy — each verified against the source: - `sqrt` / `rsqrt` are unified Tensor|Tile dispatchers, so the tile-only (t) marker was wrong. Dropped it, and noted that `high_precision=` is ignored on the tile branch: `pl.tile.rsqrt(src, tmp=...)` is the high-precision path. - `max` / `min` take two scalar-like operands and return a `Scalar`; they are not tile reductions. Described them as scalar combiners and pointed tile reductions at `row_max` / `col_max`. - `matmul_acc` has both Tensor and Tile branches — dropped its (t) marker. - `batch_matmul` raises a dispatch TypeError for Tensor operands. Marked it tile-only and pointed tensor callers at `pl.matmul`. - Replaced the literal `"` ditto marks in the broadcast rows with real text. Cross-page consistency: - `pl.read` / `pl.write` are unified dispatchers accepting Tensor or Tile, so the dispatch guide was wrong to list them as tensor-only. Removed that row rather than changing the catalog, which had it right. - Qualified the memory Edge Case row as tile-level `pl.matmul`, so it no longer appears to contradict the tensor-level lowering described earlier on the page. - Dropped the scopes/tasks row from both "not here yet" tables: that page ships in this PR, so the row pointed into the manual it claimed was missing. Corrected behaviour that was documented wrongly: - An unknown `compile()` keyword is bound against the kernel signature and raises `TypeError: got an unexpected keyword argument`. It is not silently ignored. Verified by running it; fixed in the guide, the functions page, and the debug tables (EN+ZH). - `dump_passes` accepts `bool | PassDumpLevel`, not `PassDumpLevel` alone. - `Out` is correct for a write-only buffer, so the overlap symptom is about a read-write buffer, not "a written buffer".
d53d822 to
08f8f86
Compare
markdownlint (CI failure, 8 errors): - MD060: the two-authoring-styles table had an empty first header cell, which cannot align with a `---` delimiter. Gave the column a header (EN+ZH). - MD028: two adjacent fatal-pitfall blockquotes separated by a blank line read as one blockquote with a hole. Merged into a single callout with two bullets (EN+ZH), which also matches the one-callout convention the other pages use. Operator catalog accuracy — each verified against the source: - `sqrt` / `rsqrt` are unified Tensor|Tile dispatchers, so the tile-only (t) marker was wrong. Dropped it, and noted that `high_precision=` is ignored on the tile branch: `pl.tile.rsqrt(src, tmp=...)` is the high-precision path. - `max` / `min` take two scalar-like operands and return a `Scalar`; they are not tile reductions. Described them as scalar combiners and pointed tile reductions at `row_max` / `col_max`. - `matmul_acc` has both Tensor and Tile branches — dropped its (t) marker. - `batch_matmul` raises a dispatch TypeError for Tensor operands. Marked it tile-only and pointed tensor callers at `pl.matmul`. - Replaced the literal `"` ditto marks in the broadcast rows with real text. Cross-page consistency: - `pl.read` / `pl.write` are unified dispatchers accepting Tensor or Tile, so the dispatch guide was wrong to list them as tensor-only. Removed that row rather than changing the catalog, which had it right. - Qualified the memory Edge Case row as tile-level `pl.matmul`, so it no longer appears to contradict the tensor-level lowering described earlier on the page. - Dropped the scopes/tasks row from both "not here yet" tables: that page ships in this PR, so the row pointed into the manual it claimed was missing. Corrected behaviour that was documented wrongly: - An unknown `compile()` keyword is bound against the kernel signature and raises `TypeError: got an unexpected keyword argument`. It is not silently ignored. Verified by running it; fixed in the guide, the functions page, and the debug tables (EN+ZH). - `dump_passes` accepts `bool | PassDumpLevel`, not `PassDumpLevel` alone. - `Out` is correct for a write-only buffer, so the overlap symptom is about a read-write buffer, not "a written buffer".
b49c2de to
1a6be62
Compare
markdownlint (CI failure, 8 errors): - MD060: the two-authoring-styles table had an empty first header cell, which cannot align with a `---` delimiter. Gave the column a header (EN+ZH). - MD028: two adjacent fatal-pitfall blockquotes separated by a blank line read as one blockquote with a hole. Merged into a single callout with two bullets (EN+ZH), which also matches the one-callout convention the other pages use. Operator catalog accuracy — each verified against the source: - `sqrt` / `rsqrt` are unified Tensor|Tile dispatchers, so the tile-only (t) marker was wrong. Dropped it, and noted that `high_precision=` is ignored on the tile branch: `pl.tile.rsqrt(src, tmp=...)` is the high-precision path. - `max` / `min` take two scalar-like operands and return a `Scalar`; they are not tile reductions. Described them as scalar combiners and pointed tile reductions at `row_max` / `col_max`. - `matmul_acc` has both Tensor and Tile branches — dropped its (t) marker. - `batch_matmul` raises a dispatch TypeError for Tensor operands. Marked it tile-only and pointed tensor callers at `pl.matmul`. - Replaced the literal `"` ditto marks in the broadcast rows with real text. Cross-page consistency: - `pl.read` / `pl.write` are unified dispatchers accepting Tensor or Tile, so the dispatch guide was wrong to list them as tensor-only. Removed that row rather than changing the catalog, which had it right. - Qualified the memory Edge Case row as tile-level `pl.matmul`, so it no longer appears to contradict the tensor-level lowering described earlier on the page. - Dropped the scopes/tasks row from both "not here yet" tables: that page ships in this PR, so the row pointed into the manual it claimed was missing. Corrected behaviour that was documented wrongly: - An unknown `compile()` keyword is bound against the kernel signature and raises `TypeError: got an unexpected keyword argument`. It is not silently ignored. Verified by running it; fixed in the guide, the functions page, and the debug tables (EN+ZH). - `dump_passes` accepts `bool | PassDumpLevel`, not `PassDumpLevel` alone. - `Out` is correct for a write-only buffer, so the overlap symptom is about a read-write buffer, not "a written buffer".
1a6be62 to
4b21765
Compare
Split the monolithic language guide into a chaptered `language/` guide and an `ops/` chapter, and cover the surface that had no user-facing documentation at all. New (EN + ZH, 20 pages): - language/: types, functions and programs, control flow, memory and data movement, scopes and tasks, directives, plus a chapter index. - ops/: choosing a namespace, the operator catalog, plus an index. `language/04-scopes-and-tasks.md` is the page with no prior coverage: `pl.at` / `cluster` / `spmd` / `split_aiv` placement, runtime scopes, `submit` and `deps=`, dispatch predicates, and the three granularities of opting out of dependency tracking. Migration: - `02-operation_reference.md` is removed; its material is now `ops/01-catalog.md`, a classified index rather than a hand-maintained signature table (the docstrings are the reference). - `01-language_guide.md` is reduced to compilation and retitled, pending the execution chapter that will absorb it. - 20 inbound links repointed across both languages, including the `#incore-scopes` deep link from the Python IR syntax spec. Every complete example is compile-verified. A harness extracts the python blocks from `docs/en/user/**`, builds sample arguments from the annotations and drives each complete example through a full `ir.compile()` including ptoas: 9 complete examples, all compiling. That surfaced three broken examples, all now fixed — a 1-D tensor codegen rejects, a `@pl.jit.host` block calling a function it never defined, and a control-flow quickstart using `pl.create_tensor` inside an InCore body. The last was inherited from the old guide, whose examples were never compile-verified; the two compiler-level problems found underneath it are filed as #2228 and #2229. New check `tests/lint/check_docs_symbol_coverage.py` (wired into pre-commit) fails when a name in `pypto.language.__all__` appears in no code span under `docs/en/user/`. It reads `__all__` statically with `ast` so it needs no built extension. It found 13 genuinely undocumented symbols on first run, all now covered; 209 of 222 documentable symbols are documented and the remaining 13 are listed with the batch that retires them.
markdownlint (CI failure, 8 errors): - MD060: the two-authoring-styles table had an empty first header cell, which cannot align with a `---` delimiter. Gave the column a header (EN+ZH). - MD028: two adjacent fatal-pitfall blockquotes separated by a blank line read as one blockquote with a hole. Merged into a single callout with two bullets (EN+ZH), which also matches the one-callout convention the other pages use. Operator catalog accuracy — each verified against the source: - `sqrt` / `rsqrt` are unified Tensor|Tile dispatchers, so the tile-only (t) marker was wrong. Dropped it, and noted that `high_precision=` is ignored on the tile branch: `pl.tile.rsqrt(src, tmp=...)` is the high-precision path. - `max` / `min` take two scalar-like operands and return a `Scalar`; they are not tile reductions. Described them as scalar combiners and pointed tile reductions at `row_max` / `col_max`. - `matmul_acc` has both Tensor and Tile branches — dropped its (t) marker. - `batch_matmul` raises a dispatch TypeError for Tensor operands. Marked it tile-only and pointed tensor callers at `pl.matmul`. - Replaced the literal `"` ditto marks in the broadcast rows with real text. Cross-page consistency: - `pl.read` / `pl.write` are unified dispatchers accepting Tensor or Tile, so the dispatch guide was wrong to list them as tensor-only. Removed that row rather than changing the catalog, which had it right. - Qualified the memory Edge Case row as tile-level `pl.matmul`, so it no longer appears to contradict the tensor-level lowering described earlier on the page. - Dropped the scopes/tasks row from both "not here yet" tables: that page ships in this PR, so the row pointed into the manual it claimed was missing. Corrected behaviour that was documented wrongly: - An unknown `compile()` keyword is bound against the kernel signature and raises `TypeError: got an unexpected keyword argument`. It is not silently ignored. Verified by running it; fixed in the guide, the functions page, and the debug tables (EN+ZH). - `dump_passes` accepts `bool | PassDumpLevel`, not `PassDumpLevel` alone. - `Out` is correct for a write-only buffer, so the overlap symptom is about a read-write buffer, not "a written buffer".
`pl.MX_A_ZZ` and `pl.MX_B_NN` landed on main in #2195 with no user-manual coverage, so the symbol-coverage gate failed against the merge result. They belong in the Layouts section of the types page: they tag the GM scale tensor of an MX operand on Ascend950 so a Mat-to-scale move validates the source layout instead of byte-copying incompatible data, and they are the one case where a layout marker on a `pl.Tensor` annotation is required rather than discouraged. Recorded the current limitations from that PR — explicit `target_memory=Mat` on load, rejected subviews and `remote_load`, no MX matmul. EN and ZH.
Types: - Dynamic shape led with what you give up and called the dimension "fixed per compilation", which is wrong: dynamic dims collapse to `None` in the JIT cache key, so one compiled program serves every extent and changing it does not recompile. Rewritten to lead with the purpose — an axis whose extent is unknown at compile time and may differ per launch. - Dropped the deprecated `pl.Tensor[..., pl.DN]` annotation form and the paragraph explaining it. Documented `pl.TensorView` / `pl.TensorLayout` instead, which is the non-deprecated way to describe strides explicitly. - Stopped naming internal passes as the reason directions matter. - Dropped `pl.no_dep`, which is advanced task-graph control. Functions: - `@pl.jit` is now the spine. `@pl.function` / `@pl.program` is a one-to-one transcription of the IR used mainly for compiler test cases, so it moved out of the Concept and the side-by-side Quickstart into one clearly-scoped section. The Quickstart is now a single jit example with a line-by-line table. - Runtime scope placement moved out with the rest of the ordering material. Memory: - Replaced the opening prose about buffer relationships with a box diagram showing which buffer sits on which unit and which moves are legal, marked as a placeholder until a proper Ascend 910 floorplan is available. Scopes: - `04-scopes-and-tasks.md` is now `04-scopes.md` and covers placement only: `pl.at`, `pl.cluster`, `pl.spmd`, `pl.split_aiv`. Ordering — `deps=`, `predicate=`, `submit`, the runtime-scope modes, opting out of tracking — is advanced control and belongs to its own chapter. The page says so rather than leaving a hole. `scope` / `manual_scope` / `ScopeMode` move to DEFERRED. - Dropped the deprecated `pl.split(slot_num=...)` row for the same reason as the DN annotation. Directives split in two: - `05-directives.md` keeps what actually runs at parse time: `static_print`, `static_assert`, `const`. - `06-syntax.md` takes subscript sugar, Python operators, and closure capture — parse-time rewriting rather than directives. - The dump marks belong to the tools chapter; `pl.array` was already covered by the container section in the types page, so its duplicate section is gone.
4b21765 to
9200b29
Compare
#2250 turned `pl.Tensor[..., pl.DN]` from a DeprecationWarning into a removed form, so the types page's debug table was describing an API state that no longer exists. Replaced the DeprecationWarning row with the `ParserTypeError` one, and adopted the three migration patterns that PR's hint names — source shape with no marker, `pl.transpose(x, -2, -1)` at the use site, or inheriting DN through a slice/reshape of a DN-producing op. The prose says the shorthand "is not supported" rather than "raises `ParserTypeError`": the rejection is reached from the `@pl.function` path, and on `@pl.jit` the marker is currently accepted and dropped instead. Both statements would be wrong on one of the two paths; "not supported — writing it never gets you a DN tensor" holds on both. Also folded in #2239 during the rebase: the `strategy` row no longer lists the removed `DebugTileOptimization`. EN and ZH.
Second batch of the user manual (see #2120). Adds the two reference chapters the manual
was missing, retires the page they replace, and adds a lint gate so the
pl.*surfacecannot drift out of the docs unnoticed.
Follows #2193 (site scaffolding) and #2198 (skeleton).
What lands
docs/*/user/language/— 7 pages ×2 languages. One page per part of the language,each following the manual's fixed structure (Concept → Quickstart → Mechanics → Edge
Cases → See Also):
00-types.mdTensor/Tile/Scalar/Array, layouts, dynamic shapes, parameter directions01-functions.md@pl.jitfamily,@pl.function/@pl.program, cross-function calls02-control-flow.mdrange/parallel/unroll/pipeline/while_, loop carries,yield_, SSA03-memory.mdload/store/move, valid shape and padding04-scopes-and-tasks.mdat/cluster/spmd/split_aiv, runtime scopes,submit,deps=,predicate=05-directives.mdstatic_print/static_assert,dump_tag/dumps=,pl.array, subscript sugardocs/*/user/ops/— 3 pages ×2 languages. Which namespace an operator belongs to(
pl.*vspl.tensor.*vspl.tile.*), how unified dispatch picks one, and the catalog.Migration.
02-operation_reference.mdis deleted — superseded byops/.01-language_guide.mdis reduced to its one section not covered bylanguage/("Compiling a Program"), which B6 will absorb into the execution chapter. 12 inbound
links across both languages repointed.
tests/lint/check_docs_symbol_coverage.py(wired into pre-commit). Readspypto.language.__all__statically viaast— pre-commit has no built extension, soit must not import pypto — and fails when an exported symbol appears nowhere in
docs/en/user/**. Symbols belonging to unwritten chapters sit in aDEFERREDlist, eachtagged with the batch that reclaims it; a
DEFERREDentry that has since beendocumented also fails, so the list cannot rot. It caught 13 genuine omissions while this
batch was being written.
Coverage now: 209 of 222 documentable symbols, 13 deferred to B5/B6.
Every complete example was compiled
Each fenced example that defines a full
@pl.jitentry is driven through a realir.compile()— notlower(), which stops before code generation. 9 completeexamples, 9 compiled, 0 failures. Fragments stay fragments and are labelled as such.
This is new for the manual, and it immediately paid for itself. Three examples did not
compile:
tile.store tile valid_shape must be 2D);@pl.jit.hostexample calling a function it never defined;pl.create_tensorinside an.incorebody.The third was inherited from
01-language_guide.md— the old examples were nevercompile-verified, which is how it survived. Chasing the last one surfaced two compiler
defects, filed separately as #2228 (tile-typed loop carry emits
.ptothat ptoasrejects) and #2229 (unified
pl.adddispatching totensor.addfor a Tile).Rebased onto
lower()#2230 landed mid-batch and removed
compile_for_test().language/01-functions.md(EN+ZH) is synced: the IR-inspection guidance now distinguishes
lower()(post-passir.Program) fromcompiled.program.as_python()(specialized, pre-pass), and the"verify with a full compile" pitfall no longer names a deleted API. Each new claim was
executed rather than read off the docstring —
lower(*args), argument-lesslower(),and the
AttributeErroronJITFunction.as_python().Checks
editable-install finder had silently redirected the first run to another worktree).
check_docs_symbol_coverage.py: exit 0.user/. The 6 reported arepre-existing
dev/passes/headings containing&/—, where the slug approximationdiffers from python-markdown.
check_docs_en_zh_parity/check_docs_nav/check_english_only: pass.mkdocs build --strictwas not run locally (PyPI is unreachable from this host); theDocs workflow is the check for it.