Skip to content

[Tuning] Skip run_config tests that have no tuned rows for the device - #7106

Open
RElbers wants to merge 6 commits into
mainfrom
relbers/run-config-device-coverage
Open

RElbers wants to merge 6 commits into
mainfrom
relbers/run-config-device-coverage

Conversation

@RElbers

@RElbers RElbers commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

--run_config <tuned_csv> only benchmarks rows whose gfx and cu_num match the live device. If no row matches, the tuner logs one INFO line, benchmarks nothing and exits 0. test_run_config throws away the tuner's output when it succeeds, so a family with no rows for the device passed without running a single shape. On a device with no tuned rows at all, every family passed and nothing had been checked.

Changes

  • op_tests/tuning_tests/test_run_config.py
    • Counts the tuned rows that --run_config will benchmark on the live device. It applies the same gfx and cu_num match the tuner uses.
    • A family with no matching rows is now skipped. The skip message names the device and the targets the rows do cover, for example 0 of 48 tuned rows match gfx950/cu256 (rows present: gfx942/cu304 (25), ...).
    • A family that has matching rows but where run_config reports no results now fails.
    • The coverage summary is added to the pass and failure messages.
  • aiter/utility/base_tuner.py
    • When a --run_config file leaves nothing to benchmark, the tuner now logs a warning naming the device (run_config: no tuned rows for gfx950/cu128, nothing was benchmarked).
    • The exit code stays 0. --run_config without a file keeps the existing INFO line.
  • op_tests/tuning_tests/test_tuner_infra.py
    • Adds TestRunConfigNoDeviceRows, which checks that the warning fires exactly once and names the device.

The coverage count reads the single merged file that AITER_CONFIGS produces, which is the path TestRunConfig uses.

Testing

  • python3 -m pytest op_tests/tuning_tests/test_tuner_infra.py: 29 passed, including the new test.
  • test_run_config -k test_gdn_k5_opt on gfx950/cu256: fails at the exit-code assert. This happens before the new coverage check runs, and it fails the same way without this change (see below).

Effect on the nightly gfx950/cu256 run

  • batched_a8w8 and batched_bf16 have no gfx950/cu256 rows, because none of their rows target gfx950/cu256. They used to pass without running anything and now show as skipped.
  • gdn_k5_opt does not change. Its tuner does not apply the device filter, so it benchmarks all of its gfx942/cu80 rows on gfx950. Every row reports MISMATCH (live_us drift -73%..-77% vs csv (tol 5.0%)), the tuner exits 1, and the test fails at the exit-code assert before the coverage check runs. That failure already happens without this change.
  • The other families have matching rows on gfx950/cu256 and behave as before.

PR Self-Review

Reviewed revision

875ae30

Behavior and intent

test_run_config passed a tuning family whose CSVs have no rows for the live device, because --run_config then benchmarks nothing and exits 0. It now skips such a family with a message naming the device and the targets the rows cover, and fails a family that has rows for the device but reports no results. The tuner warns, instead of logging at INFO, when a --run_config file leaves nothing to benchmark; its exit code does not change.

Validation and unverified scope

  • python3 -m pytest op_tests/tuning_tests/test_tuner_infra.py at 875ae30 (CPU): 28 passed, including the new TestRunConfigNoDeviceRows.
  • test_run_config -k test_gdn_k5_opt on gfx950/cu256 fails at the exit-code assert, before the coverage check, the same way it does on main.

Unverified: a full test_run_config run on a device with no tuned rows, where every family should now skip.

PR-specific question

None: this PR changes no tuned configuration, so no workload key selects differently. The tuner change only raises the log level of the empty---run_config message, and the test change only decides pass, skip or fail from the rows that already match the device.

Changed op tests

  • op_tests/tuning_tests/test_run_config.py: counts the tuned rows that match the live device, skips a family with none and fails a family with rows but no results. Not redundant: it is the only test that runs --run_config over the shipped CSVs.
  • op_tests/tuning_tests/test_tuner_infra.py: adds TestRunConfigNoDeviceRows, which checks the warning fires once and names the device. Not redundant: nothing else covers the empty---run_config path.

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

- Counts the tuned rows the tuner will benchmark on the live device, using
  the same gfx and cu_num match the tuner applies.
- Skips a family whose rows all target other devices, naming the device and
  the targets the rows do cover, instead of passing on an empty result.
- Fails when matching rows exist but run_config reports no results.
- Adds the coverage summary to the pass and failure messages.

run_config exits 0 without output when the device filter leaves nothing to
benchmark, so a device with no tuned rows reported a pass on every family
without running a single shape.
- Logs a warning naming the device when a run_config file leaves nothing to benchmark; the exit code stays 0.
- Covers it in test_tuner_infra.

An info line was the only sign that nothing ran, and test_run_config discards the tuner's output on success.
@RElbers
RElbers force-pushed the relbers/run-config-device-coverage branch from a262ec1 to e64f3d6 Compare October 28, 2026 18:30
@RElbers
RElbers marked this pull request as ready for review October 28, 2026 18:50
@RElbers
RElbers requested a review from a team October 28, 2026 18:50
@RElbers RElbers changed the title Skip run_config tests that have no tuned rows for the device [Tuning] Skip run_config tests that have no tuned rows for the device Oct 28, 2026
@RElbers
RElbers requested a review from yzhou103 October 28, 2026 18:51
Copilot AI balanced review requested due to automatic review settings November 8, 2026 14:03

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@aiter-bot

aiter-bot commented Nov 8, 2026 •

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision 00be47bd0167 · 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. Which exact workload keys consume these configuration changes, and what evidence shows that unrelated shapes keep their previous selection?
  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 — Reviewed revision must contain at least the first 7 characters of the current head SHA

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

This branch has not been deployed

No deployments
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.

3 participants