Repository navigation
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
- 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.
a262ec1 to
e64f3d6
Compare
WAITING ON AUTHORPR Self-ReviewRevision 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
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
Motivation
--run_config <tuned_csv>only benchmarks rows whosegfxandcu_nummatch the live device. If no row matches, the tuner logs one INFO line, benchmarks nothing and exits 0.test_run_configthrows 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--run_configwill benchmark on the live device. It applies the samegfxandcu_nummatch the tuner uses.0 of 48 tuned rows match gfx950/cu256 (rows present: gfx942/cu304 (25), ...).run_configreports no results now fails.aiter/utility/base_tuner.py--run_configfile leaves nothing to benchmark, the tuner now logs a warning naming the device (run_config: no tuned rows for gfx950/cu128, nothing was benchmarked).--run_configwithout a file keeps the existing INFO line.op_tests/tuning_tests/test_tuner_infra.pyTestRunConfigNoDeviceRows, which checks that the warning fires exactly once and names the device.The coverage count reads the single merged file that
AITER_CONFIGSproduces, which is the pathTestRunConfiguses.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_opton 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_a8w8andbatched_bf16have 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_optdoes 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.PR Self-Review
Reviewed revision
875ae30
Behavior and intent
test_run_configpassed a tuning family whose CSVs have no rows for the live device, because--run_configthen 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_configfile leaves nothing to benchmark; its exit code does not change.Validation and unverified scope
python3 -m pytest op_tests/tuning_tests/test_tuner_infra.pyat 875ae30 (CPU): 28 passed, including the newTestRunConfigNoDeviceRows.test_run_config -k test_gdn_k5_opton gfx950/cu256 fails at the exit-code assert, before the coverage check, the same way it does on main.Unverified: a full
test_run_configrun 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_configmessage, 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_configover the shipped CSVs.op_tests/tuning_tests/test_tuner_infra.py: addsTestRunConfigNoDeviceRows, which checks the warning fires once and names the device. Not redundant: nothing else covers the empty---run_configpath.