Skip to content

docs(ptodsl): clarify user guide operation contracts#830

Draft
jimmychou0 wants to merge 1 commit into
hw-native-sys:mainfrom
jimmychou0:issue800-docs-fixes
Draft

docs(ptodsl): clarify user guide operation contracts#830
jimmychou0 wants to merge 1 commit into
hw-native-sys:mainfrom
jimmychou0:issue800-docs-fixes

Conversation

@jimmychou0

Copy link
Copy Markdown
Contributor

Summary

This PR addresses a set of PTODSL user-guide issues from #800 that still reproduce on current .

The changes focus on documentation correctness and contract clarity:

  • remove an outdated Chapter 14 reference in the introduction
  • clarify that is mutable and document the common runtime-tail update pattern
  • fix the control-flow cross-reference in Chapter 5
  • explain the boundary between Python built-ins and runtime helpers
  • document / as explicit-mode shorthand wrappers for the canonical DMA surfaces
  • add guidance for default usage
  • add formal documentation and include it in the tile-op quick reference
  • remove the duplicated UB state allocation block in the flash-attention walkthrough
  • clarify why the Chapter 12 GEMM example legitimately stays in

Validation

Local checks on this branch:

All passed locally.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates several chapters of the PTODSL user guide, adding clarifications on mutable valid_shape, device-side scalar math helpers, shorthand MTE wrappers, and the pto.tile.mov operation, while also cleaning up redundant code blocks and fixing section references. Feedback suggests using the standard term "memory spaces" instead of "domains" or "contracts" in the new pto.tile.mov documentation to maintain consistency with the rest of the guide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +87 to +94
### 8.1.2a Tile movement between domains

#### `pto.tile.mov(src: Tile, dst: Tile, *, mode=None) -> None`

**Description**: Moves data between compatible tile domains without going
through GM. This is the tile-domain transfer surface used when a workflow needs
to stage data from one tile contract into another, for example UB → MAT before
a cube sub-kernel consumes the result.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain consistency with the rest of the documentation (such as Chapter 4 and Chapter 7), it is recommended to use the standard term memory spaces instead of domains or contracts. This ensures uniform terminology across the user guide.\n\nSuggested replacement:\nmarkdown\n### 8.1.2a Tile movement between memory spaces\n\n#### `pto.tile.mov(src: Tile, dst: Tile, *, mode=None) -> None`\n\n**Description**: Moves data between compatible tile memory spaces without going\nthrough GM. This is the tile-to-tile transfer surface used when a workflow needs\nto stage data from one tile memory space into another, for example UB → MAT before\na cube sub-kernel consumes the result.\n

@reedhecre

reedhecre commented Jun 17, 2026

Copy link
Copy Markdown

Codex Review

该评论由 review 机器人自动更新。

  • PR: docs(ptodsl): clarify user guide operation contracts #830 docs(ptodsl): clarify user guide operation contracts
  • Author: jimmychou0
  • Base/Head: main / issue800-docs-fixes
  • Head SHA: 05d2d85da1aa
  • Trigger: 检测到新的 open PR
  • Generated At: 2026-06-17T01:51:12Z
  • Status: failed at codex-review (exit=1)

Summary

Review failed at stage codex-review: exit=1

Findings

未生成结构化 findings,因为 review 过程提前失败。

Log Tail

cd '/tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/repo'
git fetch origin 'refs/pull/830/head:pr-830' --depth 50
git fetch origin 'main' --depth 50 || true
git checkout -f 'pr-830'
git rev-parse HEAD
git diff --stat 'origin/main...HEAD' || true
Cloning into '/tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/repo'...
From https://github.com/hw-native-sys/PTOAS
 * [new ref]         refs/pull/830/head -> pr-830
From https://github.com/hw-native-sys/PTOAS
 * branch            main       -> FETCH_HEAD
Switched to branch 'pr-830'
05d2d85da1aacbcf7cc9508d650aea5e5bbd798a
 ptodsl/docs/user_guide/01-introduction.md          |  1 -
 .../docs/user_guide/04-type-system-and-buffer.md   |  9 ++++++
 ptodsl/docs/user_guide/05-control-flow.md          |  2 +-
 .../docs/user_guide/06-scalar-and-pointer-ops.md   |  5 +++
 ptodsl/docs/user_guide/07-data-movement-ops.md     |  9 +++++-
 ptodsl/docs/user_guide/08-compute-operations.md    | 36 ++++++++++++++++++++++
 .../user_guide/11-flash-attention-walkthrough.md   | 20 +++---------
 ptodsl/docs/user_guide/12-additional-examples.md   | 11 ++++++-
 8 files changed, 73 insertions(+), 20 deletions(-)
===== END STAGE clone rc=0 @ 2026-06-17 09:50:36 =====

===== STAGE codex-review @ 2026-06-17 09:50:36 =====
set -euo pipefail
cd '/tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/repo'
'codex' exec -C '/tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/repo' -s read-only -c 'model_provider="codereview"' -c 'model="gpt-5.4"' -c 'model_reasoning_effort="xhigh"' --output-schema '/tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/review_schema.json' -o '/tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/codex_last_message.json' --color never - < '/tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/review_prompt.txt'
OpenAI Codex v0.115.0 (research preview)
--------
workdir: /tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/repo
model: gpt-5.4
provider: codereview
approval: never
sandbox: read-only
reasoning effort: xhigh
reasoning summaries: none
session id: 019ed345-f37c-74b0-94d7-2dcfb840afc0
--------
user
你现在在审查 GitHub PR。

仓库:hw-native-sys/PTOAS
PR:#830 docs(ptodsl): clarify user guide operation contracts
作者:jimmychou0
base branch:origin/main
head branch:HEAD(当前已 checkout 到 PR head)

要求:
1. 只审查这个 PR 相对 origin/main 的改动,必要时可以看上下文文件。
2. 重点找真实的 correctness / regression / contract mismatch / CI / runtime / compatibility 问题。
3. 不要提纯风格建议,不要提低价值猜测。
4. 严格按优先级输出:
   - P1:高概率会导致错误结果、编译/运行失败、严重回归、发布阻断
   - P2:重要缺陷、行为回归、遗漏校验/测试、较大兼容性问题
   - P3:次要但明确可改的问题
5. 如果没有问题,summary 直接写:未检查到 PR #830 存在问题,并返回 findings=[]。
6. 如果有问题,summary 简洁概括,findings 里每条都要给出:
   - severity
   - title
   - body(说明为什么是问题,尽量具体)
   - file(尽量给相对路径)
   - line(能确定就填整数,否则 null)

建议先查看:
- git status --short
- git diff --stat origin/main...HEAD
- git diff --unified=80 origin/main...HEAD

最终输出必须严格匹配 JSON schema。

mcp startup: no servers
Reconnecting... 1/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: 4d0102cf-5013-492d-9d38-5bee2582063d)
Reconnecting... 2/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: fe680c9d-f1ba-461b-a16e-cfe15bd6fda2)
Reconnecting... 3/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: 44b85ba0-0a62-4af1-bf3e-3379f36c71ee)
Reconnecting... 4/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: a8a04ea8-7434-47b1-8bf3-d46b1d0e8dce)
Reconnecting... 5/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: b7b13b12-0b71-466f-9f01-f8687540075b)
ERROR: unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: 7ddb8728-9b23-4914-abe9-488edefde9ed
Warning: no last agent message; wrote empty content to /tmp/ptoas-pr-review-monitor/runs/20260617_095031_pr830/codex_last_message.json
===== END STAGE codex-review rc=1 @ 2026-06-17 09:51:12 =====

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.

2 participants