Skip to content

Add: test alternating matmul-add on host build graph - #1785

Merged
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
doraemonmj:add/hbg-alternating-matmul-add
Aug 11, 2026
Merged

Add: test alternating matmul-add on host build graph#1785
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
doraemonmj:add/hbg-alternating-matmul-add

Conversation

@doraemonmj

Copy link
Copy Markdown
Contributor

Summary

  • Add the host_build_graph counterpart of all three alternating_matmul_add cases.
  • Keep the TMR parameters, callable signatures, tolerances, argument generation, and golden unchanged.
  • Reuse the existing TMR orchestration and incore kernel sources directly so both runtimes execute the same graph.
  • Remove the runtime-specific wording from the shared orchestration header.

This is one workload-sized part of #1727.

Performance

Measured on one locked a2a3 NPU through task-submit: eight adjacent TMR/HBG pairs, alternating order, ten rounds per process and case, with each case's first round excluded (72 steady samples per runtime/case).

Case Host total: TMR -> HBG Change Device wall: TMR -> HBG Change
default 1.248 -> 2.876 ms +130.46% 0.052 -> 0.108 ms +106.17%
Case1 32.937 -> 42.572 ms +29.25% 0.988 -> 0.927 ms -6.13%
Case2 29.494 -> 38.885 ms +31.84% 0.820 -> 0.784 ms -4.36%

The production-sized cases improve on device. The one-matmul/one-add default case is too small to amortize HBG's fixed graph-build cost and regresses as expected. Case1's paired device change is -6.07% (95% CI -9.61% to -2.39%); Case2 is -4.25% (-10.19% to +2.09%).

These measurements used simpler base 7b3a9754 and PTO-ISA pin 0cefc9a5a1c24c62655cc345d408559595a8af32. Main later merged #1763, which removes redundant HBG arena initialization and explicitly leaves device time unchanged; the device comparison remains representative, while the host/bind values above are conservative pre-#1763 measurements.

Performance job: task_20260811_004737_99227219015 (NPU 3, exit 0).

Testing

  • HBG default, Case1, and Case2 onboard golden: task_20260811_004643_94395715733
  • Eight-pair onboard performance comparison
  • All pre-commit hooks for the changed files

Port all three cases with the same parameters, signatures, and golden
as the tensormap-and-ringbuffer test. Reuse the existing orchestration
and incore kernel sources so both runtimes exercise the same graph.
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: 53201bb8-8d05-4789-ba24-a1aab50e564a

📥 Commits

Reviewing files that changed from the base of the PR and between 9a8b9d0 and d1b1b8e.

📒 Files selected for processing (2)
  • tests/st/a2a3/host_build_graph/alternating_matmul_add/test_alternating_matmul_add.py
  • tests/st/a2a3/tensormap_and_ringbuffer/alternating_matmul_add/kernels/orchestration/alternating_orch.cpp

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.

@ChaoZheng109
ChaoZheng109 merged commit 4f55c69 into hw-native-sys:main Aug 11, 2026
16 checks passed
@doraemonmj
doraemonmj deleted the add/hbg-alternating-matmul-add branch August 18, 2026 02:48
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