Skip to content

feat(codegen): validate bitwise op family - #2188

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

feat(codegen): validate bitwise op family#2188
hashiqiqixian wants to merge 4 commits into
hw-native-sys:mainfrom
hashiqiqixian:feat/ptoas-b07-bitwise

Conversation

@hashiqiqixian

Copy link
Copy Markdown
Contributor

Summary

  • align tile.and_, tile.or_, tile.xor, tile.ands, tile.ors, and tile.xors with the current PTO-ISA dtype, valid-region, scalar, row-major layout, scratch, and aliasing contracts
  • remove tile dtype promotion/broadcasting from exact bitwise ops, preserve signed/unsigned tile widths across the cross-architecture IR contract, and reject unsigned scalar encodings that PTOAS cannot represent
  • add focused type and MemoryReuse 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 editable install on /data/chenshenai/test2: passed
  • focused bitwise contract UT: 48 passed
  • focused XOR aliasing UT: 1 passed
  • repository header, English-only, and docs parity checks: passed
  • A2/A3 codegen-only with latest PTOAS assembly: 18 passed; generated .pto files contain exact pto.tand, pto.tor, pto.txor, pto.tands, pto.tors, and pto.txors signatures
  • A2/A3 task-submit hardware, one precompile worker and one 18-case batch: 18/18 passed on device 1

Runtime coverage includes zero, all-one, and alternating bit patterns; signed/unsigned 8/16-bit tile forms; signed 8/16-bit scalar encoding; XOR scratch separation; 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: 10169e79-4d8d-49f5-9ef3-ee26326e3517

📥 Commits

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

📒 Files selected for processing (9)
  • 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_bitwise_binary.py
  • tests/ut/ir/operators/test_tile_ops.py
  • tests/ut/ir/transforms/test_memory_reuse.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: 92fc53b9ef

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