Skip to content

[Docs] FlyDSL review guidance: live-GPU test gates, test quality, Copilot checks, aiter FlyDSL notes - #7226

Merged
zufayu merged 2 commits into
ROCm:mainfrom
samremes:docs/flydsl-review-guidance
Nov 10, 2026
Merged

zufayu merged 2 commits into
ROCm:mainfrom
samremes:docs/flydsl-review-guidance

Conversation

@samremes

@samremes samremes commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Companion PR: #7227 updates aiter-bot's FlyDSL rules (D10, D10b, new D13 and D14). This PR changes only the C5 block of rules.md, so the two rebase cleanly.

Summary

Updates the FlyDSL review guidance that Copilot, Claude and Codex read, based on a study of one month of review outcomes on aiter FlyDSL PRs. The study covered 1,430 review findings on 157 PRs and paired each comment with the commits that followed it.

  • Test gates and the recorded card use get_gfx_runtime(), consistently in C5, the Copilot FlyDSL instructions and aiter-op-test.
  • aiter-op-test gains a "test that can fail" section.
  • The Copilot FlyDSL instructions gain "Before you report" and "Still check" sections.
  • New aiter/ops/flydsl/AGENTS.md (imported by aiter/ops/flydsl/CLAUDE.md) holds the aiter-specific FlyDSL notes.

Motivation

  • Test gates used the wrong helper. docs: Copilot FlyDSL path instructions and review-pr C5 #5730 told tests to gate on get_gfx(). That helper returns the last GPU_ARCHS entry, not the GPU in use: on an MI355X with GPU_ARCHS='gfx950;gfx942', get_gfx() returns gfx942 and get_gfx_runtime() returns gfx950 (measured). The aiter-op-test rule it came from wants to "run clean on every supported card", which means the live card. Copilot then pushed get_gfx() into tests, and authors rejected it ([FlyDSL] [JIT] Add adaptive-blocked K5 prefill h-recurrence in GDN #5732).

  • Copilot is the reviewer on every FlyDSL PR, and its comments now cost authors time. Since [CI] Add shadow PR self-review gate #7003, each Copilot finding needs an author reply. In the month studied, Copilot made 665 findings:

    • about 75% were judged valid and 52% were acted on;
    • 6% were false positives and 19% overstated severity.

    The false positives came from a few repeating patterns: hand-computed LDS figures, reading only the diffed lines, workgroup-barrier scope, const_expr unrolling, and predicting compile failures on paths the PR's tests run. The new "Before you report" list targets exactly these. The "Still check" list keeps the checks that found real bugs.

  • Weak tests. Many human review comments were about tests that could not fail: constant scales, a clamp that never triggered, pre-zeroed outputs, self-comparison, and tests CI never runs.

  • [Misc] Package aiter skills as a Claude Code plugin; drop FlyDSL duplicates #7208 drops aiter-specific notes. It removes aiter's copies of the FlyDSL authoring and cleanup skills in favor of FlyDSL's. Those copies carried notes that only apply to aiter: where code goes, reuse of tensor_shim, and the pinned version. aiter/ops/flydsl/AGENTS.md keeps them, together with what a compiled-handle cache must key. This PR does not touch the two skills [Misc] Package aiter skills as a Claude Code plugin; drop FlyDSL duplicates #7208 deletes, and it keeps their table rows in the Copilot file as they are.

Changes

  • .claude/skills/aiter-op-test/SKILL.md:
    • rule 9 and its examples use get_gfx_runtime(), with the reason;
    • new rule 10 and a section "A test that can fail";
    • two new anti-patterns.
  • .claude/skills/review-pr/rules.md, C5 block only:
    • code that asks which GPU it runs on (dispatch, test gates, the recorded card) uses get_gfx_runtime(), and build-time codegen and AOT use get_gfx();
    • an added get_gfx() test gate fires (b);
    • unchanged lines stay clear.
  • .github/instructions/aiter-ops-flydsl.instructions.md:
    • the same helper split;
    • test checks;
    • new "Before you report" and "Still check" sections.
  • aiter/ops/flydsl/AGENTS.md (new): FlyDSL version, where code goes, tensor_shim reuse, the compiled-handle cache contract, legacy buffer_ops, raw ops, architectures, and tests.
  • aiter/ops/flydsl/CLAUDE.md (new): @AGENTS.md, following aiter/ops/triton/.

No code changes.

Testing

  • Unit tests added or updated
  • Performance benchmarks run
  • Tested on MI250X
  • Tested on MI300X

Documentation and review-guidance change only. The facts the text relies on were checked on MI355X; see Validation below.

Documentation

  • Docstrings updated
  • User guide updated
  • Performance guide updated
  • No documentation change is needed, with the reason stated below

The change is itself agent and review documentation.

Dependencies

  • No new third-party dependencies added
  • New dependencies are listed and justified below

Breaking Changes

None. Existing get_gfx() calls in tests keep working and are not flagged on unchanged lines. Only new or changed test gates are expected to use get_gfx_runtime().

PR Self-Review

Reviewed revision

b703f18

Behavior and intent

Validation and unverified scope

  • Rebased on main 4726326bd48. Merges cleanly with [Build] [Misc] Add create-pr skill for review-ready aiter PRs #7207, which now carries [Misc] Package aiter skills as a Claude Code plugin; drop FlyDSL duplicates #7208: [Build] [Misc] Add create-pr skill for review-ready aiter PRs #7207 rewrites the skills table in the Copilot FlyDSL file, and this PR edits only the sections below it.
  • get_gfx vs get_gfx_runtime(): measured on MI355X, aiter main, each helper in a fresh process:
    • GPU_ARCHS unset, native, gfx950 or gfx942;gfx950: both helpers return gfx950;
    • GPU_ARCHS='gfx950;gfx942': get_gfx() returns gfx942 and get_gfx_runtime() returns gfx950;
    • get_lds_capacity_bytes("gfx950") == 163840.
  • CI is unaffected. aiter-test.yaml exports GPU_ARCHS only for the prebuild step, so the test containers run with the native arch.
  • Compiled-handle facts in AGENTS.md: checked on MI355X with FlyDSL 0.4.0 and 0.4.1. flyc.compile with live args launches once and with CPU or placeholder args not at all. A handle reused on a view without its unit-stride axis writes outside the view. A padded-row view is correct. A handle reused on another device fails with hipErrorInvalidDevice, which is printed but not raised. The probe scripts are small standalone Python files, and I can attach them on request.
  • review-pr wiring:
    • triage.py expand still emits the C5 body;
    • triage.py mapping is unchanged;
    • check_prompts.py passes.
  • Unverified:
    • whether Copilot code review reads aiter/ops/flydsl/AGENTS.md; its review of this PR will show it;
    • the effect on Copilot's false-positive rate, which I plan to re-measure two to four weeks after merge with the same pipeline.

PR-specific question

The PR Self-Review comment posted no path-specific question for this revision; the readiness report passed all checks.

Changed op tests

None.

@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 7226 --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.

@aiter-bot

aiter-bot commented Oct 30, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision b703f18fe594 · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

- **Arch helpers.** Review agents and test authors are told to use `get_gfx_runtime()` wherever the code asks which GPU it is running on, including test gates, because `get_gfx()` follows `GPU_ARCHS` and can name another arch.
- **Copilot.** Copilot gets concrete checks for the patterns behind its false positives on aiter FlyDSL PRs, so authors spend less time replying to wrong findings under the #7003 gate.
- **aiter-specific notes.** The FlyDSL notes that #7208 removes get a home in `aiter/ops/flydsl/AGENTS.md`.

Validation and unverified scope

- **Rebased on main `4726326bd48`.** Merges cleanly with #7207, which now carries #7208: #7207 rewrites the skills table in the Copilot FlyDSL file, and this PR edits only the sections below it.
- **`get_gfx` vs `get_gfx_runtime()`:** measured on MI355X, aiter main, each helper in a fresh process:
  - `GPU_ARCHS` unset, `native`, `gfx950` or `gfx942;gfx950`: both helpers return `gfx950`;
  - `GPU_ARCHS='gfx950;gfx942'`: `get_gfx()` returns `gfx942` and `get_gfx_runtime()` returns `gfx950`;
  - `get_lds_capacity_bytes("gfx950") == 163840`.
- **CI is unaffected.** `aiter-test.yaml` exports `GPU_ARCHS` only for the prebuild step, so the test containers run with the native arch.
- **Compiled-handle facts in `AGENTS.md`:** checked on MI355X with FlyDSL 0.4.0 and 0.4.1. `flyc.compile` with live args launches once and with CPU or placeholder args not at all. A handle reused on a view without its unit-stride axis writes outside the view. A padded-row view is correct. A handle reused on another device fails with `hipErrorInvalidDevice`, which is printed but not raised. The probe scripts are small standalone Python files, and I can attach them on request.
- **review-pr wiring:**
  - `triage.py expand` still emits the C5 body;
  - `triage.py mapping` is unchanged;
  - `check_prompts.py` passes.
- **Unverified:**
  - whether Copilot code review reads `aiter/ops/flydsl/AGENTS.md`; its review of this PR will show it;
  - the effect on Copilot's false-positive rate, which I plan to re-measure two to four weeks after merge with the same pipeline.

PR-specific question

The PR Self-Review comment posted no path-specific question for this revision; the readiness report passed all checks.

Changed op tests

None.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply
  • ADVISORY — Copilot did not review the current head SHA

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed

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

@samremes
samremes requested a review from zufayu November 2, 2026 16:04
@samremes
samremes marked this pull request as ready for review November 3, 2026 18:49
@samremes
samremes requested review from a team and a balanced review from Copilot November 3, 2026 18:49
@github-actions github-actions Bot changed the title FlyDSL review guidance: live-GPU test gates, test quality, Copilot checks, aiter FlyDSL notes [Docs] FlyDSL review guidance: live-GPU test gates, test quality, Copilot checks, aiter FlyDSL notes Nov 3, 2026
@github-actions github-actions Bot added the Docs label Nov 3, 2026
Test gates and the recorded card use get_gfx_runtime(): get_gfx() returns
the last GPU_ARCHS entry, which on an MI355X with GPU_ARCHS='gfx950;gfx942'
is gfx942. C5, the Copilot FlyDSL instructions and aiter-op-test now agree.

aiter-op-test gains a "test that can fail" section. The Copilot FlyDSL
instructions gain checks for the patterns behind its false positives and
the checks that found real bugs. aiter/ops/flydsl/AGENTS.md keeps the
aiter-specific FlyDSL notes: layout, tensor_shim reuse, the pin, and what a
compiled-handle cache must key.

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

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 guidance still permits silent test mismatches, conflicts with caller-supplied output requirements, incorrectly rejects maximum-error checks, and omits dtype from the cache contract.

4 open issues
What changed in this PR

This documentation-only PR updates aiter’s FlyDSL test and review guidance and preserves repository-specific notes ahead of the upstream skill transition.

Changes:

  • Aligns test gates and recorded GPU architecture with get_gfx_runtime(), reserving get_gfx() for build-time selection.
  • Adds test-quality requirements and review checks intended to reduce false positives.
  • Introduces shared FlyDSL agent notes and a Claude import.
File Description
aiter/​ops/​flydsl/​CLAUDE.md Imports the shared FlyDSL agent notes.
aiter/​ops/​flydsl/​AGENTS.md Documents aiter-specific layout, caching, API, architecture, and test guidance.
.github/​instructions/​aiter-ops-flydsl.instructions.md Adds review safeguards and updates architecture-helper guidance.
.claude/​skills/​review-pr/​rules.md Updates C5 to require live-GPU detection for new test gates.
.claude/​skills/​aiter-op-test/​SKILL.md Updates architecture examples and adds requirements for tests that detect failures.

Review effort: Balanced

Comment thread .claude/skills/aiter-op-test/SKILL.md Resolved
Comment thread .claude/skills/aiter-op-test/SKILL.md Resolved
Comment thread .claude/skills/aiter-op-test/SKILL.md Resolved
Comment thread aiter/ops/flydsl/AGENTS.md Resolved
Copilot AI balanced review requested due to automatic review settings November 5, 2026 08:28
@samremes
samremes force-pushed the docs/flydsl-review-guidance branch from 691b190 to d85f6a7 Compare November 5, 2026 08:28
Assert on checkAllclose in the op-test template, name the aggregate error
measures that hide one corrupted row, use a NaN sentinel for caller-supplied
output buffers, and key compiled-handle caches on tensor dtype.

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

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

The canonical test template records mismatch ratios without asserting an acceptance threshold, so incorrect output can still pass despite the new correctness rule.

3 open issues
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 5, 2026 08:33

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 to judge the impact of misleading FNUZ support guidance and shared FlyDSL instructions that may not be discovered in related directories.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@zufayu

zufayu commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@aiter-bot review

@aiter-bot

Copy link
Copy Markdown

aiter-bot — queued behind 1 review(s); expect to start in about 28 min. The box reviews one PR at a time.

@aiter-bot

Copy link
Copy Markdown

⚠️ aiter-bot — this review could not complete: a problem with the GLM model service, not with this PR.

GLM backend unavailable at http://localhost:30000 (deep inference probe returned '000')

@yhl-amd — please take a look.

Triage: if GLM serves but its output is malformed it may be the ATOM framework (@valarLip); if the box, GPU, disk or network is unhealthy it may be the machine (@gyohuangxin).

Re-comment @aiter-bot review once it is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants