You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: Copilot FlyDSL path instructions and review-pr C5 - #5730
Copilot code review does not load .claude/skills on its own. GitHub's supported hook is path-specific files under .github/instructions/*.instructions.md with applyTo globs; without excludeAgent, Copilot code review uses them (repository custom instructions, Copilot code review). Triton already uses this; FlyDSL PRs had none, so Copilot reviewed kernels with generic mixed-device advice and invented gcnArchName probes against get_gfx_runtime().
Add .github/instructions/aiter-ops-flydsl.instructions.md so matching FlyDSL/wrapper/test diffs get the in-repo authoring, cleanup, and aiter-op-test skills, plus the chip_info ISA-gate policy (homogeneous node; do not reimplement arch detection per kernel).
Add review-pr C5 (pointer only) on flydsl, flydsl-kernel, and ops-wrapper so Claude reviews do not re-raise the same false positive.
Test plan
Confirm Copilot on this draft (or a follow-up FlyDSL PR) no longer asks for per-kernel gcnArchName / mixed-device ISA checks when the wrapper uses get_gfx_runtime().
Confirm a test-only FlyDSL diff still gets aiter-op-test expectations (get_gfx() in main(), checkAllclose, one canonical suite).
python3 triage.py mapping matches committed MAPPING.md; C5 expands from rules.md.
Copilot code review does not load .claude/skills unless pointed there.
Match the existing Triton instructions file so FlyDSL PRs get authoring,
cleanup, and op-test rules, and stop mixed-device flags on get_gfx_runtime.
Signed-off-by: Sami Remes <[email protected]>
Co-authored-by: Cursor <[email protected]>
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 5730 --add-label <label>
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 opt this PR out.
Apply architecture dispatch rule to Tier-2 wrapper paths
.claude/skills/review-pr/triage.py:1091
Attaching the rule only to ops-wrapper leaves Tier-2 wrappers uncovered because this branch is an elif after p in TIER. For example, changes to aiter/ops/mha.py or aiter/ops/attention.py derive tier2-dispatch, not ops-wrapper, even though the new applyTo: "aiter/ops/*.py" policy covers them and these files perform architecture dispatch. Add this rule to tier2-dispatch (or derive it independently for all matching wrapper paths) and regenerate MAPPING.md.
Resolve overlap between CLEAR and FIRE architecture detection rules
.claude/skills/review-pr/rules.md:150
The CLEAR and FIRE conditions overlap: a PR can use get_gfx() in one path while adding a gcnArchName probe in another, making the rule direct the reviewer to both outcomes. Since the local probe is the violation, make CLEAR conditional on all added ISA detection using the shared helpers and let any new local probe take precedence.
Expand FlyDSL test glob to cover operation-prefixed filenames
This glob misses existing FlyDSL test files whose operation name precedes flydsl, including op_tests/test_mha_flydsl.py, op_tests/test_mla_flydsl.py, and op_tests/test_mha_flydsl_varlen_bwd.py. Changes to those tests therefore will not receive the new test/architecture instructions, so the stated test-only coverage is incomplete. Expand the top-level test glob to match flydsl anywhere after test_.
The direction of this PR makes sense. The old rules have a real gap: C4 only checks newly hardcoded architecture strings, the existing FlyDSL rules do not define where runtime ISA information must come from, and GitHub Copilot does not load the .claude/skills guidance. This can lead to the right diagnosis but the wrong fix, such as replacing a runtime get_gfx() check with a new per-op gcnArchName/get_device_properties probe instead of using the shared helper.
Please tighten the change before merge:
Runtime dispatch/wrappers should use get_gfx_runtime(); tests and build-time/codegen paths should use get_gfx(). C5 currently treats either helper as CLEAR in any context, and the existing C4 example still says runtime-wrapper get_gfx() is acceptable.
Any newly added local ISA probe must take precedence and FIRE. CLEAR should require that all newly added architecture detection uses the appropriate shared helper, so CLEAR and FIRE cannot overlap.
Attach C5 to tier2-dispatch as well as the current families; otherwise standalone changes to mha.py, attention.py, quant.py, etc. skip it because of the preceding elif.
Broaden applyTo to cover the existing operation-prefixed and nested FlyDSL tests/benchmarks, including test_mha_flydsl.py, test_mla_flydsl.py, multigpu tests, and op_tests/op_benchmarks/flydsl/**.
Please also add focused regression cases for the runtime-vs-build helper distinction, Tier-2 wrapper derivation, local-probe precedence, and representative instruction globs.
Runtime dispatch must use get_gfx_runtime(); tests and codegen use
get_gfx(), which follows GPU_ARCHS and can name a different ISA on a
multi-target build. C5 now fires on an added local probe or an added
runtime get_gfx(), and clears only when every added check fits its
context. The C4 aiter#3870 example defers helper choice to C5.
C5 was skipped for Tier-1/Tier-2 files because ops-wrapper is the last
elif; attach it to tier1-import-chain and tier2-dispatch too.
Broaden applyTo to op-prefixed, multigpu, and benchmark FlyDSL files.
Co-authored-by: Cursor <[email protected]>
Signed-off-by: Sami Remes <[email protected]>
Thanks @zufayu, all four policy points were real gaps. Pushed 6aa1dd47bc:
Helper choice depends on context. C5 and the Copilot instructions now say runtime dispatch uses get_gfx_runtime(), and tests and codegen use get_gfx(), because get_gfx() follows GPU_ARCHS and returns the last entry on a multi-target build. An added get_gfx() in a runtime path fires C5. The C4 aiter#3870 example now points the helper question to C5.
Clear and fire no longer overlap. Any added local probe fires. Clearing requires every added architecture check to use the helper that fits its context. Only + lines count, so the ~38 wrappers that already call get_gfx() aren't flagged retroactively.
Tier-2 (and Tier-1) routing. C5 is now attached to tier2-dispatch and tier1-import-chain, so mha.py, attention.py, quant.py, jit/core.py and the rest no longer skip it because of the elif. MAPPING.md regenerated.
applyTo.op_tests/**/*flydsl*.py and op_tests/op_benchmarks/flydsl/** now cover test_mha_flydsl.py, test_mla_flydsl.py, test_mha_flydsl_varlen_bwd.py, the multigpu QuickReduce test and the bwd benchmark.
On regression cases: the skill has no test harness, and adding one for prose rules felt out of scope, so I checked it with made-up diffs instead:
case
before
after
aiter/ops/mha.py adds gcnArchName
-
C5
aiter/ops/attention.py adds runtime get_gfx()
-
C5
aiter/ops/quant.py + aiter/ops/gemm_op_a4w4.py
-
C5
aiter/jit/core.py adds gcnArchName
-
C5
aiter/ops/gemm_op_a4w4.py (control)
C5
C5
aiter/ops/flydsl/pa_decode.py (control)
C5
C5
op_tests/test_mha_flydsl.py (control)
C5
C5
op_tests/test_gemm_a8w8.py (negative control)
-
-
triage.py expand on the first case emits the new C5 text, including its synthetic fire/clear examples (runtime-vs-build split and local-probe precedence). Against main, the new globs cover 34/34 FlyDSL files under op_tests/ (29 before) and match no non-FlyDSL controls. That glob check uses Python's PurePath.full_match, which only approximates GitHub's matcher. triage.py mapping matches MAPPING.md, and check_prompts.py reports no drift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.claude/skillson its own. GitHub's supported hook is path-specific files under.github/instructions/*.instructions.mdwithapplyToglobs; withoutexcludeAgent, Copilot code review uses them (repository custom instructions, Copilot code review). Triton already uses this; FlyDSL PRs had none, so Copilot reviewed kernels with generic mixed-device advice and inventedgcnArchNameprobes againstget_gfx_runtime()..github/instructions/aiter-ops-flydsl.instructions.mdso matching FlyDSL/wrapper/test diffs get the in-repo authoring, cleanup, and aiter-op-test skills, plus the chip_info ISA-gate policy (homogeneous node; do not reimplement arch detection per kernel).review-prC5 (pointer only) onflydsl,flydsl-kernel, andops-wrapperso Claude reviews do not re-raise the same false positive.Test plan
gcnArchName/ mixed-device ISA checks when the wrapper usesget_gfx_runtime().get_gfx()inmain(),checkAllclose, one canonical suite).python3 triage.py mappingmatches committedMAPPING.md; C5 expands fromrules.md.Made with Cursor