Skip to content

Dynamic A5 sim DSL examples#821

Open
MirkoDeVita98 wants to merge 4 commits into
hw-native-sys:mainfrom
MirkoDeVita98:dynamic_examples
Open

Dynamic A5 sim DSL examples#821
MirkoDeVita98 wants to merge 4 commits into
hw-native-sys:mainfrom
MirkoDeVita98:dynamic_examples

Conversation

@MirkoDeVita98

Copy link
Copy Markdown

No description provided.

@reedhecre

reedhecre commented Jun 15, 2026

Copy link
Copy Markdown

Codex Review

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

  • PR: Dynamic A5 sim DSL examples #821 Dynamic A5 sim DSL examples
  • Author: MirkoDeVita98
  • Base/Head: main / dynamic_examples
  • Head SHA: 817b4ef17c1d
  • Trigger: PR 有新提交
  • Generated At: 2026-06-16T13:46:09Z
  • Previous Head SHA: f8f3579a9261
  • Status: failed at codex-review (exit=1)

Summary

Review failed at stage codex-review: exit=1

Findings

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

Log Tail

===== STAGE clone @ 2026-06-16 21:45:29 =====
set -euo pipefail
rm -rf '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/repo'
git clone --branch 'main' --depth 50 'https://github.com/hw-native-sys/PTOAS.git' '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/repo'
cd '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/repo'
git fetch origin 'refs/pull/821/head:pr-821' --depth 50
git fetch origin 'main' --depth 50 || true
git checkout -f 'pr-821'
git rev-parse HEAD
git diff --stat 'origin/main...HEAD' || true
Cloning into '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/repo'...
From https://github.com/hw-native-sys/PTOAS
 * [new ref]         refs/pull/821/head -> pr-821
From https://github.com/hw-native-sys/PTOAS
 * branch            main       -> FETCH_HEAD
Switched to branch 'pr-821'
817b4ef17c1da64c33a151cce5c2b0d330e867d3
 ptodsl/examples/dynamic_softmax_launch.py         | 235 ++++++++++++++++++++
 ptodsl/examples/fast_hadamard_launch.py           | 219 ++++++++++++++++++
 ptodsl/examples/fast_inverse_dense_launch.py      | 256 ++++++++++++++++++++++
 ptodsl/examples/inverse_block_inversion_launch.py | 242 ++++++++++++++++++++
 4 files changed, 952 insertions(+)
===== END STAGE clone rc=0 @ 2026-06-16 21:45:34 =====

===== STAGE codex-review @ 2026-06-16 21:45:34 =====
set -euo pipefail
cd '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/repo'
'codex' exec -C '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/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/20260616_214527_pr821/review_schema.json' -o '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/codex_last_message.json' --color never - < '/tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/review_prompt.txt'
OpenAI Codex v0.115.0 (research preview)
--------
workdir: /tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/repo
model: gpt-5.4
provider: codereview
approval: never
sandbox: read-only
reasoning effort: xhigh
reasoning summaries: none
session id: 019ed0ae-270e-7051-be23-5e715e28590b
--------
user
你现在在审查 GitHub PR。

仓库:hw-native-sys/PTOAS
PR:#821 Dynamic A5 sim DSL examples
作者:MirkoDeVita98
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 #821 存在问题,并返回 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: 12a9ff31-b690-4513-a080-410e13ab8746)
Reconnecting... 2/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: 91b885df-def0-44ca-9bcb-2c79594c45b0)
Reconnecting... 3/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: e5d4caf8-e9ee-44f8-8a08-369048270ca4)
Reconnecting... 4/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: 38a3ab80-4212-4952-aae8-5a7b12c8d0f5)
Reconnecting... 5/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: cfb757dd-aba2-4a41-af27-2b037007b1a0)
ERROR: unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, request id: c577d781-a387-4943-9ea4-23901a06273a
Warning: no last agent message; wrote empty content to /tmp/ptoas-pr-review-monitor/runs/20260616_214527_pr821/codex_last_message.json
===== END STAGE codex-review rc=1 @ 2026-06-16 21:46:09 =====

@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 introduces a new example file, dynamic_softmax_launch.py, which demonstrates a dynamic-shape row-wise softmax launch demo using PTODSL. The feedback highlights a potential issue with using Python's built-in hash() function to seed the random number generator, as hash randomization makes it non-deterministic across different runs. A deterministic seeding approach is suggested to ensure reproducible test inputs.

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.

def make_case_inputs(case: dict[str, object]):
seq = int(case["seq"])
rows = int(case["rows"])
rng = np.random.RandomState(hash(case["name"]) & 0xFFFFFFFF)

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

Using Python's built-in hash() function on strings for seeding the random number generator is non-deterministic across different Python processes/runs due to hash randomization. This can lead to non-reproducible test inputs, making debugging flaky test failures or comparing performance runs difficult. Consider using a deterministic seed based on the case name, such as the sum of its character codes.

Suggested change
rng = np.random.RandomState(hash(case["name"]) & 0xFFFFFFFF)
seed = sum(ord(c) for c in case["name"])
rng = np.random.RandomState(seed)

pto.set_flag("MTE2", "V", event_id=0)
pto.wait_flag("MTE2", "V", event_id=0)

with pto.simd():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually you don't need pto.simd() under explicit mode

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