Repository navigation
[tuner] Reject zero timing measurements - #6941
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🟢 Approval recommended
The focused timing guards and regression tests have no unresolved issues identified by static review.
No open issues 🎉
What changed in this PR
This PR strengthens aiter’s tuning pipeline so invalid latency measurements cannot win candidate selection or overwrite tuning configurations.
Changes:
- Mark repeated zero-time worker measurements as failures.
- Reject non-positive and non-finite timings during result processing and config writing.
- Add regression coverage for worker failures, invalid-result filtering, and preserving existing configurations.
| File | Description |
|---|---|
op_tests/tuning_tests/test_tuner_infra.py |
Tests invalid timing filtering, failed fallback results, and config preservation. |
op_tests/tuning_tests/test_mp_tuner_logic.py |
Tests failure reporting after repeated zero measurements. |
aiter/utility/mp_tuner.py |
Marks zero timings as failed after retries are exhausted. |
aiter/utility/base_tuner.py |
Filters invalid timings from selection, metric calculations, and config updates. |
Review effort: Balanced
Treat repeated zero-latency measurements as failures and prevent non-positive or non-finite timings from being selected or written to tuning configs. Add worker, post-processing, and config-writing regression coverage. Co-authored-by: Cursor <[email protected]>
e773d37 to
8afa106
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 |
|
@zoe-cop review |
A NaN timing makes every comparison False, so sorting the candidate list before dropping invalid entries left it out of order: with [8.0, nan, 5.0] and topk=1 the 8.0us kernel was selected instead of 5.0us. Filter first, then sort the valid candidates. Add a regression test with a NaN between valid timings.
* [tuner] Reject zero timing measurements Treat repeated zero-latency measurements as failures and prevent non-positive or non-finite timings from being selected or written to tuning configs. Add worker, post-processing, and config-writing regression coverage. Co-authored-by: Cursor <[email protected]> * [tuner] Filter invalid timings before sorting candidates A NaN timing makes every comparison False, so sorting the candidate list before dropping invalid entries left it out of order: with [8.0, nan, 5.0] and topk=1 the 8.0us kernel was selected instead of 5.0us. Filter first, then sort the valid candidates. Add a regression test with a NaN between valid timings. --------- Co-authored-by: Ying Zhou <[email protected]> Co-authored-by: Cursor <[email protected]>

Treat repeated zero-latency measurements as failures and prevent non-positive or non-finite timings from being selected or written to tuning configs. Add worker, post-processing, and config-writing regression coverage.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist