Skip to content

feat: add B10 math and fused ops - #2191

Open
hashiqiqixian wants to merge 11 commits into
hw-native-sys:mainfrom
hashiqiqixian:feat/ptoas-b10-math-fused
Open

feat: add B10 math and fused ops#2191
hashiqiqixian wants to merge 11 commits into
hw-native-sys:mainfrom
hashiqiqixian:feat/ptoas-b10-math-fused

Conversation

@hashiqiqixian

Copy link
Copy Markdown
Contributor

Summary

  • add tile.axpy with destination reuse and exact pto.taxpy emission
  • add fused tile.add_relu with exact pto.taddrelu emission
  • add tile.pow / tile.pows with integer no-scratch and floating scratch/precision contracts
  • add Python IR/DSL exports, focused UT/ST coverage, and paired English/Chinese docs
  • keep B10 independent from B02-B09 so it can merge without relying on earlier batch PRs

Validation

  • remote serial C++ build passed on /data/chenshenai/test2
  • Ruff check and format check passed
  • 6 focused IR/codegen unit tests passed
  • A2/A3 task-submit hardware: taxpy, tpow, tpows all passed (3/3, one precompile worker)
  • 964 header checks, 1080 English checks, and 81 docs parity checks passed
  • validated against official PTOAS v0.53 installed under the task environment

PTOAS limitation

pto.taddrelu is emitted exactly and covered with a skip_ptoas=True codegen assertion. Official PTOAS v0.53 parses the op but its A2/A3 conversion marks it explicitly illegal, including for a full tile, so same-name hardware execution remains blocked upstream and is recorded as such 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: ff60c286-533d-4dac-a856-41e079380b2c

📥 Commits

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

📒 Files selected for processing (14)
  • 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
  • python/pypto/debug/torch_codegen.py
  • python/pypto/ir/op/tile_ops.py
  • python/pypto/language/__init__.py
  • python/pypto/language/op/__init__.py
  • python/pypto/language/op/tile_ops.py
  • src/backend/common/pto_ops_elementwise.cpp
  • src/ir/op/tile_ops/elementwise.cpp
  • tests/st/runtime/ops/test_math_fused.py
  • tests/ut/debug/test_torch_codegen.py
  • tests/ut/ir/operators/test_math_fused_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: 080aa62f2c

ℹ️ 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/backend/common/pto_ops_elementwise.cpp Outdated
Comment thread python/pypto/ir/op/tile_ops.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