Skip to content

review-pr: add HK20 (submodule upstream check) and A4 (new-feature re… - #6865

Merged
zufayu merged 4 commits into
ROCm:mainfrom
yzhou103:review-pr-hk20-submodule-pin
Nov 3, 2026
Merged

zufayu merged 4 commits into
ROCm:mainfrom
yzhou103:review-pr-hk20-submodule-pin

Conversation

@yzhou103

Copy link
Copy Markdown
Contributor

…gression guard)

HK20: flags when a 3rdparty/* submodule is pinned to a commit not on
any upstream branch. Ref: PR#5708 vs PR#4620.

A4: when a PR adds a new dispatch branch to an existing kernel, shared code changes can silently regress pre-existing paths. Refs: PR#5708 (enable_bias narrowing), PR#5985 (kStoreTakesDivisor widening broke gfx942 fp16), PR#5914 (runtime check caused VGPR spill, occupancy drop from 5 to 4 waves/SIMD).

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@yzhou103
yzhou103 marked this pull request as ready for review October 23, 2026 09:47
@yzhou103
yzhou103 requested review from a team and a balanced review from Copilot October 23, 2026 09:47
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6865 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Copilot AI left a comment

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.

🟡 Changes recommended

The infrastructure shortcut bypasses the new check for standalone submodule repins, and the upstream-membership guidance needs safeguards against incomplete local refs.

2 open issues
What changed in this PR

This PR extends the review tooling with checks for submodule upstream membership and regressions in existing kernel paths when new features are added.

Changes:

  • Adds HK20 guidance for checking 3rdparty/* submodule pins against upstream branches.
  • Adds A4 guidance for preserving correctness and performance of existing kernel paths.
  • Updates triage to select these rules for relevant changes.
File Description
.claude/​skills/​review-pr/​triage.py Adds submodule-repin detection and selects the new review rules.
.claude/​skills/​review-pr/​rules.md Documents upstream-membership and existing-path regression checks.

Review effort: Balanced

Comment thread .claude/skills/review-pr/triage.py Resolved
Comment thread .claude/skills/review-pr/rules.md Resolved
@zufayu
zufayu self-requested a review October 26, 2026 01:08
@zufayu zufayu self-assigned this Oct 26, 2026
@zufayu

zufayu commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Thanks for adding these two checks. I found one functional issue that currently prevents HK20 from covering its intended case:

  • In triage.py, the infra-only early return runs before _has_submodule_repin is computed. Because 3rdparty/ is part of INFRA, a normal standalone submodule repin (and a repin accompanied only by docs) returns [("infra-only", "NONE")], so HK20 is never selected. Please compute the repin flag before that shortcut, exempt repins from the early return, and add focused derive() tests for those two cases.

Two smaller follow-ups should be fixed in the same update:

  • git branch -r --contains <hash> is only reliable after successfully fetching complete canonical-upstream refs and restricting the check to those refs. Missing objects/incomplete fetches should be treated as inconclusive; otherwise the rule can produce either false positives or false clearance from stale/fork refs.
  • Please regenerate MAPPING.md. On the current merge target it still reports 45 families / 62 rule IDs, while triage.py mapping produces 46 / 64 and includes the new submodule-repin family plus the A4 additions. A mapping-drift selftest would also prevent this recurring.

Other than these review-tool issues, I did not find additional problems. Once they are addressed, this should be straightforward to re-review.

yzhou103 and others added 2 commits October 29, 2026 07:20
…gression guard)

HK20: flags when a 3rdparty/* submodule is pinned to a commit not on
any upstream branch. Ref: PR#5708 vs PR#4620.

A4: when a PR adds a new dispatch branch to an existing kernel, shared
code changes can silently regress pre-existing paths. Refs: PR#5708
(enable_bias narrowing), PR#5985 (kStoreTakesDivisor widening broke
gfx942 fp16), PR#5914 (runtime check caused VGPR spill, occupancy
drop from 5 to 4 waves/SIMD).

Co-Authored-By: Claude <[email protected]>
…k, mapping drift guard

- triage.py: detect a 3rdparty/ submodule repin before the infra-only and
  version-bump shortcuts. 3rdparty/ is INFRA, so a standalone repin (or one
  with only docs alongside) returned infra-only and HK20 was never selected.
- rules.md: HK20 checks only refs fetched from the canonical upstream URL
  (from base .gitmodules), not `git branch -r`. A failed fetch, shallow repo
  or missing object is inconclusive (warning), never clean or red.
- MAPPING.md: regenerated (46 families / 64 rule ids).
- selftest.sh: derive() tests for the two repin cases and a MAPPING.md drift check.
@yzhou103
yzhou103 force-pushed the review-pr-hk20-submodule-pin branch from 8a9f173 to fc54101 Compare October 29, 2026 07:28
Copilot AI balanced review requested due to automatic review settings October 29, 2026 07:28

Copilot AI left a comment

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.

🟡 Changes recommended

Rule-routing and fallback omissions can skip required checks, while submodule citation mismatches can block valid reports and stale upstream refs can falsely establish pin reachability.

4 open issues
2 resolved since last review

Review effort: Balanced

Comment thread .claude/skills/review-pr/rules.md Resolved
Comment thread .claude/skills/review-pr/triage.py Resolved
Comment thread .claude/skills/review-pr/triage.py Resolved
Comment thread .claude/skills/review-pr/triage.py Resolved
- rules.md: HK20 fetch uses --prune so refs for branches deleted upstream
  cannot clear a pin on a repeated review.
- triage.py audit_card: count changed extensionless paths (submodules) named
  in a FIRE verdict as citations, so a card reporting HK20 without the rule
  code no longer fails with UNREPORTED-FIRE.
- triage.py: add A4 and HK20 to ALL_RULES (fallback inventory) and A4 to
  flydsl-kernel; regenerate MAPPING.md.
- selftest.sh: FlyDSL A4 routing case and derive-to-card cases for red and
  inconclusive HK20 findings.
Copilot AI balanced review requested due to automatic review settings October 29, 2026 09:27

Copilot AI left a comment

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.

🟡 Changes recommended

Active issues leave valid mixed-hex commit evidence rejected and shared-bias regression rule A4 omitted for host-side dtype or activation dispatch changes.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Include host-side dtype dispatch changes in A4 derivation

.claude/​skills/​review-pr/​triage.py:1081

A diff confined to aiter/fused_moe.py that adds a dtype or activation branch and narrows the shared enable_bias guard does not select A4. These host-side changes match neither kernel detection nor the routing-value check, so the new regression rule is omitted from rules_expanded.txt for the shared-bias scenario it is meant to cover. Include host-side dtype and activation dispatch changes in A4 derivation, add regression fixtures, and regenerate MAPPING.md.

4 resolved since last review

Review effort: Balanced

Comment thread .claude/skills/review-pr/selftest.sh Resolved
@zufayu

zufayu commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Thanks for fixing the HK20 standalone-repin routing, canonical-upstream check, mapping drift, and earlier follow-ups. I did a focused pass on head 4f9388f. Please address these two remaining functional gaps together: (1) A4 is still not selected for host-side dtype/activation dispatch changes confined to a wrapper such as aiter/fused_moe.py. A new branch that also changes shared bias/scale logic can therefore miss the existing-path regression check; extend derivation to cover that case and add a fixture. (2) The HK20 card test uses numeric-only 2222222, but a real mixed-hex commit ID such as 1f66d862 is not recognized as concrete evidence and a valid red finding fails with UNPROVEN-RED; accept commit SHAs and add a mixed-hex fixture. These are the remaining blockers from my review. Once both focused tests and the review-bot selftest pass on the updated head, with required CI green, I can complete the focused re-review without another broad round.

- Add 'activation' keyword and A4 rule to dispatch-change family so
  host-side wrapper changes (e.g. fused_moe.py adding activation branch)
  trigger A4 regression checks
- Add commit SHA pattern ([0-9a-f]{7,40}) to VALUE regex so mixed-hex
  hashes like 1f66d862 are recognized as concrete evidence
- Add selftest fixtures for both fixes
- Regenerate MAPPING.md
Copilot AI balanced review requested due to automatic review settings November 3, 2026 06:00
@aiter-bot

Copy link
Copy Markdown

NOT READY FOR HUMAN REVIEW

PR Self-Review

Revision c7b32ff7b3f4 · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. What is the most important boundary or failure mode introduced by this change, and what evidence covers it?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — missing ### Reviewed revision in the PR description
  • FAIL — missing ### Behavior and intent in the PR description
  • FAIL — missing ### Validation and unverified scope in the PR description
  • FAIL — missing ### PR-specific question in the PR description
  • FAIL — missing ### Changed op tests in the PR description
  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA
  • FAIL — Behavior and intent has no substantive answer
  • FAIL — Validation and unverified scope has no substantive answer
  • FAIL — PR-specific question has no substantive answer

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

Copilot AI left a comment

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.

🔵 Needs a closer look

Human assessment is needed because inconsistencies in submodule warning templates and citation matching can cause valid reviews to fail validation.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@zufayu
zufayu merged commit e10bd0a into ROCm:main Nov 3, 2026
zufayu added a commit that referenced this pull request Nov 3, 2026
The bot's review of this PR reported that the diff no longer applies to the
merge target: main gained e10bd0a (#6865), whose [derive] selftest block
lands exactly where this branch adds its own test lines. Verified -- that one
file is the only conflict, and every other changed file's base blob still
matches main.

Both sides are kept: #6865's [derive]/[mapping] cases and this branch's
degrade, fetch-failure and citation tests are unrelated checks in the same
file. selftest is 97 green / 0 red on the merged tree, ruff clean, 34 pytest
cases passing.

Merged rather than rebased so the published branch only ever moves forward.

# Conflicts:
#	.claude/skills/review-pr/selftest.sh
shantipriya-amd pushed a commit to shantipriya-amd/aiter that referenced this pull request Nov 18, 2026
ROCm#6865)

* review-pr: add HK20 (submodule upstream check) and A4 (new-feature regression guard)

HK20: flags when a 3rdparty/* submodule is pinned to a commit not on
any upstream branch. Ref: PR#5708 vs PR#4620.

A4: when a PR adds a new dispatch branch to an existing kernel, shared
code changes can silently regress pre-existing paths. Refs: PR#5708
(enable_bias narrowing), PR#5985 (kStoreTakesDivisor widening broke
gfx942 fp16), PR#5914 (runtime check caused VGPR spill, occupancy
drop from 5 to 4 waves/SIMD).

Co-Authored-By: Claude <[email protected]>

* review-pr: select HK20 for standalone repins, canonical-ref HK20 check, mapping drift guard

- triage.py: detect a 3rdparty/ submodule repin before the infra-only and
  version-bump shortcuts. 3rdparty/ is INFRA, so a standalone repin (or one
  with only docs alongside) returned infra-only and HK20 was never selected.
- rules.md: HK20 checks only refs fetched from the canonical upstream URL
  (from base .gitmodules), not `git branch -r`. A failed fetch, shallow repo
  or missing object is inconclusive (warning), never clean or red.
- MAPPING.md: regenerated (46 families / 64 rule ids).
- selftest.sh: derive() tests for the two repin cases and a MAPPING.md drift check.

* review-pr: address Copilot review on HK20/A4

- rules.md: HK20 fetch uses --prune so refs for branches deleted upstream
  cannot clear a pin on a repeated review.
- triage.py audit_card: count changed extensionless paths (submodules) named
  in a FIRE verdict as citations, so a card reporting HK20 without the rule
  code no longer fails with UNREPORTED-FIRE.
- triage.py: add A4 and HK20 to ALL_RULES (fallback inventory) and A4 to
  flydsl-kernel; regenerate MAPPING.md.
- selftest.sh: FlyDSL A4 routing case and derive-to-card cases for red and
  inconclusive HK20 findings.

* review-pr: fix A4 host-side dispatch gap and HK20 mixed-hex evidence

- Add 'activation' keyword and A4 rule to dispatch-change family so
  host-side wrapper changes (e.g. fused_moe.py adding activation branch)
  trigger A4 regression checks
- Add commit SHA pattern ([0-9a-f]{7,40}) to VALUE regex so mixed-hex
  hashes like 1f66d862 are recognized as concrete evidence
- Add selftest fixtures for both fixes
- Regenerate MAPPING.md

---------

Co-authored-by: Claude <[email protected]>
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.

4 participants