Skip to content

feat(codegen): validate shift op family - #2189

Open
hashiqiqixian wants to merge 4 commits into
hw-native-sys:mainfrom
hashiqiqixian:feat/ptoas-b08-shift
Open

feat(codegen): validate shift op family#2189
hashiqiqixian wants to merge 4 commits into
hw-native-sys:mainfrom
hashiqiqixian:feat/ptoas-b08-shift

Conversation

@hashiqiqixian

Copy link
Copy Markdown
Contributor

Summary

  • align tile.shl, tile.shr, tile.shls, and tile.shrs with the current PTO-ISA dtype, valid-region, scalar, and row-major layout contracts
  • remove mixed-dtype promotion and shape broadcasting from exact tile shifts, preserve signed/unsigned 8/16/32-bit cross-architecture IR support, and reject unsigned scalar encodings that PTOAS cannot represent
  • add focused type coverage plus same-name runtime ST, and record A2/A3 hardware evidence in both status matrices

Validation

  • complete local diff review: passed
  • git diff --check: passed
  • Ruff check and format check for changed Python files: passed
  • serial CMake build and environment install on /data/chenshenai/test2: passed
  • focused shift contract UT: 32 passed
  • repository header, English-only, and docs parity checks: passed
  • A2/A3 codegen-only with latest PTOAS assembly: 8 passed; generated .pto files contain exact pto.tshl, pto.tshr, pto.tshls, and pto.tshrs operand types and order
  • A2/A3 task-submit hardware, one precompile worker and one 8-case batch: 8/8 passed on device 1

Runtime coverage includes left/right shifts, signed/unsigned 16-bit tile forms, zero/one/width-minus-one counts, scalar/tile forms, and narrowed valid_shape. A5 hardware validation remains pending and is documented in the status matrix.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@hashiqiqixian, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 96857b34-c559-41a2-addb-101450341a20

📥 Commits

Reviewing files that changed from the base of the PR and between 478ddad and a58f7f6.

📒 Files selected for processing (8)
  • docs/en/dev/codegen/00-pto_codegen.md
  • docs/en/dev/ptoas-op-status.md
  • docs/zh-cn/dev/codegen/00-pto_codegen.md
  • docs/zh-cn/dev/ptoas-op-status.md
  • src/backend/common/pto_ops_elementwise.cpp
  • src/ir/op/tile_ops/elementwise.cpp
  • tests/st/runtime/ops/test_shift.py
  • tests/ut/ir/operators/test_tile_ops.py

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: d27d094fd1

ℹ️ 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".

Comment thread src/ir/op/tile_ops/elementwise.cpp
Comment thread tests/st/runtime/ops/test_shift.py
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