Skip to content

[CK] [CI] [JIT] [Tuning] Per-candidate faults, selection proof and auto-select in --compare - #5846

Merged
yzhou103 merged 11 commits into
mainfrom
users/bartgips/tuning-shared-infra
Nov 19, 2026
Merged

yzhou103 merged 11 commits into
mainfrom
users/bartgips/tuning-shared-infra

Conversation

@amd-bartgips

@amd-bartgips amd-bartgips commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Shared tuning code for the MHA tuner (#6580), as extensions of the existing mp_tuner, run_config and --compare --update_improved flow. Today a fault in one candidate can fail its whole group, and nothing checks that a tuned row is what dispatch then selects.

Stack. main → #5846 (this) → #5762 MHA lookup → #6580 MHA tuner. No kernel changes.

mp_tuner

  • A fault fails only its candidate. When a worker dies, times out or its group raises, the candidate it was running fails, the group keeps what it measured, and the rest go to the restarted pool. A group that faults 5 times in a row without measuring anything returns the rest as not_run. This holds for every caller. A KeyError from the worker PID map (a worker was replaced) leaves the group queued, as on main since [Feat] Add tuner event pid recovery and fix deadlock #6895, until the restart its root-cause fault triggers or only such groups are left. A fault is told apart by exception type, not message text: torch.AcceleratorError, or any error after which torch.cuda.synchronize() fails, which the worker re-raises as GpuContextLost.
  • Statuses, opt-in. With return_status=True, mp_tuner returns (results, statuses): one status (ok, mismatch, unsupported, crash, timeout, zero_time, oom_*, not_run) and detail per result, in the same order. Results stay main's 3-value TuneResult with .watts for every caller, so a family's own code that unpacks (info, us, err_ratio) keeps working when it opts in. A family that writes the statuses in its result_to_df gets them in --profile_file.
  • A shape without candidates no longer fails the batch. A tuner gives such a shape an in_datas entry with count 0 but no task group, so the shape-grouped path's count assert failed and the whole batch was lost (on main; found by @mpashkovskii). Zero-count entries are now dropped before groups are matched, and the shape is reported as untuned.

run_config and --compare (opt-in per family; nothing changes for a family that doesn't set these)

  • Dispatch verification. With SELECTION_PROBE_MODULE, run_config runs each row through the public op in a fresh process, with the config variable pointed at the table, and checks the selection dispatch recorded. A stale row, or one whose dispatch or output doesn't check out, is reported as an error. A row the family cannot check (expected_selection returns None) is unchecked and logs a warning. When the tuner swaps in its own table, the fresh process also merges the model_configs/ files, as serving does for the default table; a table the user set is verified as given.
  • Auto-select as a baseline. With COMPARE_AUTOSELECT, --compare also times auto-select (a header-only table). --update_improved then drops a row that auto-select beats, and writes no row for a candidate that doesn't beat it.
  • Stale rows. stale_reason(row) marks a row the family's dispatch would skip, so a plain run retunes it.

Promotion bar. Unchanged: main's --min_improvement_pct (3%), overridden per family in ARG_DEFAULTS or on the CLI. It must now be in [0, 100). A noise-aware bar would be a follow-up: promote only when the gain clears both the minimum and the measured noise, as #5849's race does with paired statistics.

gpu_model. Not in this PR. The shared tuner's tables are not keyed on the GPU model; the MHA table is, so the model detection and the rows keyed on it are in #5762 and #6580.

Cost. Shape-grouped runs (--shape_grouped, or --mp 1) start one multiprocessing.Manager per mp_tuner call; other runs start none, to keep per-candidate results across a worker death. Under spawn it re-imports the tuner script: about 2.7 s and 0.9 GB. The per-group cleanup (gc.collect(), empty_cache(), about 120 ms) also runs only for shape-grouped groups, so per-candidate runs such as fmoe don't pay it per candidate.

Overlaps

  • #6941 (@yzhou103, merged) rejects 0 µs timings. A candidate it marks as failed gets the status zero_time, and its worker test also checks that status.
  • #6895 (@jamesETsmith, merged) restarts the pool once every remaining task has a stale PID mapping. This PR keeps that; its restart also resumes each group after what it already measured.
  • #6970 (@rpoornac, merged) added --select power and the SelectionPolicy that mp_tuner reads. The policy, final_timing and the power-path check are kept as main has them, and every caller still gets main's TuneResult with watts, including a return_status=True caller, whose statuses come as a separate list. --select power already rejects --compare --update_improved, so the auto-select baseline only adds or removes rows under latency selection. Dispatch verification sets the family's config variable, so the fresh process skips the AITER_SELECT=power overlay and checks the table it was given.
  • #7091 (@RElbers) adds an early return info, us, round(max_err_ratio, 4) to the mp_tuner worker. On top of this PR that path would drop the status and watts, so it should return through _format_worker_result. #7106 (@RElbers) and #7148 (@Woody-Hu) conflict with this PR only in the test files.
  • #6709 added an a_preshuffle column to tuned_grouped_fmoe.csv without a blank value in GroupedFmoeTuner, so two test_tuner_infra tests fail on main. The third commit adds it (dispatch reads a blank as 0), since this PR's CI runs that file.
  • #5668 (closed) and #6844 also key tuned lookups on hardware (cu_num).

GPU faults during power measurement (#7493). When tuning for power, #6970 runs each candidate a second time to read its power draw. If the GPU crashes during that second run, the error is currently swallowed and the candidate just gets no power reading. The crash then surfaces on the next candidate in the same worker, which gets the blame instead. #7493 lets the crash through, so this PR's fault handling blames the right candidate.

Size. 13 files, +2,032 / −189 (about 1,070 lines of tests). Owner: @yzhou103.

PR Self-Review

Reviewed revision

b9b4d72c4

Behavior and intent

A fault in one tuning candidate (a GPU fault, or a worker that dies or hangs) used to fail its whole shape group. Now only that candidate fails and the rest of the group is resubmitted. A shape with no candidates also no longer aborts a shape-grouped batch. Nothing checked that a tuned row is what dispatch then selects. run_config can now verify that in a fresh process. --compare can time auto-select as a baseline, so --update_improved no longer keeps a row that auto-select beats. Verification and the auto-select baseline are opt-in per family; a family that doesn't set them is unchanged.

Validation and unverified scope

Head b9b4d72c4 (main 99211b6f4 merged in), one MI355X (gfx950):

  • python3 -m unittest op_tests.tuning_tests.{test_mp_tuner_logic,test_dispatch_verification,test_tuner_infra,test_csv_validation,test_compare_logic,test_mp_tuner_fault}: all 138 passed. test_mp_tuner_fault covers the paths the status change touches, end to end.

On c54ea45ff (main 0f61f2b95), which also held the model detection now in #5762:

  • [HIP] [CK] [JIT] [Tuner] Rank accuracy-qualified kernels by package energy #6970's test_fast_tuning.py: 52 passed, 1 skipped, 1 failed, the same as on main without a GPU (the failure is Triton finding no GPU driver; the skip needs a GPU).
  • The rest of op_tests/tuning_tests/ except the GPU suites: the same results as main (four test_fhmoe_tuner.py tests need a GPU on both). The two test_tuner_infra tests that fail on main pass here (third commit).
  • Black 26.10.1 and Ruff 0.16.0 (the CI versions): clean on the changed files and the whole repository.

On MI355X, earlier heads:

  • The zero-candidate fix end to end, on head 925c133e4 (main bbef5a6f2): gemm_a16w16_tune.py --libtype flydsl --mp 1 with 8×128×128 bf16 and the same shape with bpreshuffle=True. Without the fix it fails with group count (1) != in_datas count (2) and tune 0 shapes. With it, the first shape is tuned and written, and the second is listed as untuned.

Unverified:

  • Not run on this head: the zero-candidate tune on a GPU.
  • --select power together with this PR's fault handling was not run on a GPU; only the CPU tests above cover it.
  • No tuner in this PR sets SELECTION_PROBE_MODULE or COMPARE_AUTOSELECT, so dispatch verification and the auto-select baseline run here only against a stub family. MHA (#5762, #6580) is the first real user.
  • Other architectures were not run locally.

PR-specific question

The .github/ changes only add tests to existing lists: five op_tests/tuning_tests/ files to split_tests.sh, two modules to the unittest command in tuning-tests.yaml, and one timing row to split-test-times/aiter.tsv. No trigger, permission, secret or runner changes. split_tests.sh runs in aiter-test.yaml's split_aiter_tests job under pull_request, not pull_request_target, so fork code there gets a read-only token and no secrets, as before. tuning-tests.yaml runs only on schedule and workflow_dispatch, so PR code cannot trigger it. The added tests run on the same runners, with the same privileges, as the existing op tests.

Changed op tests

  • test_mp_tuner_logic.py (extended): CPU tests of the new fault handling in mp_tuner. They cover statuses returned alongside the results, resuming a faulted group after what it measured, the fault probe by type and synchronize(), the 5-fault budget, a shape without candidates, a stale PID map waiting for the restart its fault triggers, and a worker's record (status, detail and watts) surviving the trip back from the worker. [tuner] Reject zero timing measurements #6941's zero-timing test also checks the zero_time status. The existing tests cover only the polling loop's timeout and pool restart.
  • test_mp_tuner_fault.py (new): the same paths end to end on one GPU with the real spawn pool: a GPU fault inside a candidate, a worker that exits, and a failure while building inputs. Only this test exercises real process death and pool restart; the logic tests use an in-process fake pool.
  • test_dispatch_verification.py (new): the new dispatch_verification module and run_config's use of it, against a stub family. It covers a verified row, a wrong selection, a wrong output, an unchecked row, a row for another GPU, and the model_configs/ merge (for a table the tuner wrote, not a --run_config file). The module is new, so nothing else covers it.
  • test_compare_logic.py (extended): the auto-select baseline in --compare --update_improved, the [0, 100) bar check and stale rows. The existing tests cover the compare plan and merge without auto-select.
  • README.md: lists the two new test files and the new coverage of the extended ones. Documentation only.

@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; main branch always runs both MI35X and MI300X
multigpu 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: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
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 5846 --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.

amd-bartgips added a commit that referenced this pull request Sep 25, 2026
The race, resume journal, finalist rounds, standard-error gate, evidence
manifest and re-tune incumbent move to a follow-up on top of #5846, so
this PR carries only what a first tuned table needs:

- every candidate (or a seeded --candidate-sample) is measured once
  through the stock mp_tuner, alongside the auto-select incumbent and the
  shipped tile defaults;
- a winner is published only if it beats the incumbent by more than
  MHA_FWD_INDIFFERENCE_DELTA (2%), and every written row is proven by a
  fresh-process dispatch probe;
- shapes that already have a row for this GPU are skipped unless --all
  is given; --all --compare --update_improved re-tunes them and replaces
  a row only if the public operator got faster;
- a re-tune that finds auto-select best warns that the existing row still
  overrides it, since writing no row cannot remove one.

Candidates that fail the accuracy check are labelled mismatch rather than
crash, against the --errRatio the run was given.

Co-authored-by: Cursor <[email protected]>
amd-bartgips added a commit that referenced this pull request Sep 25, 2026
mp_tuner, base_tuner's measurement_kwargs and _read_csv fix, the
FileBaton zombie check and their tests return to #5592's version. They
now live in #5846, where the other tuners can use them, and the MHA
tuner no longer needs them. base_tuner keeps only the gpu_model filter
in run_config that tuned MHA rows rely on.

Co-authored-by: Cursor <[email protected]>
amd-bartgips added a commit that referenced this pull request Sep 28, 2026
The gate against the incumbent used 2%, while --all --compare
--update_improved keeps a row only if the public operator got at least
--min_improvement_pct (3%) faster. A 2-3% winner could be published by
the search and then be refused by the protected re-tune. The gate now
uses the same 3% and the same "at least" comparison, as
MHA_FWD_MIN_IMPROVEMENT, which is also the value the shared
PromotionPolicy in #5846 uses.

Co-authored-by: Cursor <[email protected]>
amd-bartgips added a commit that referenced this pull request Sep 28, 2026
#5846 now has one improvement bar (min_improvement_pct, 3%) for
--compare and the gate, and leaves the finalist settings to the search
that uses them. This branch adds them back as FinalistPolicy (finalists,
rounds, significance_sigma) next to RacePolicy, and changes what the bar
means:

- gate_against_incumbent takes a noise_pct floor and promotes only at
  max(min_improvement_pct, noise_pct). Before, the standard-error bar
  replaced the delta, so enough finalist rounds would publish a real but
  tiny win that --compare would then refuse.
- The floor is two combined standard errors under the exhaustive
  strategy, and the race's delta under --strategy race.
- The MHA tuner reads the bar from --min_improvement_pct, so one flag
  sets it for both the search and --compare. --delta defaults to it and
  is only needed to make the race's indifference zone differ.
- standard_error_bar and every margin are in percent, as --compare
  reports them; the evidence manifest records margin_pct, bar_pct and
  noise_floor_pct per promotion, and the promotion bar per run.

Co-authored-by: Cursor <[email protected]>
amd-bartgips added a commit that referenced this pull request Sep 28, 2026
The race, resume journal, finalist rounds, standard-error gate, evidence
manifest and re-tune incumbent move to a follow-up on top of #5846, so
this PR carries only what a first tuned table needs:

- every candidate (or a seeded --candidate-sample) is measured once
  through the stock mp_tuner, alongside the auto-select incumbent and the
  shipped tile defaults;
- a winner is published only if it beats the incumbent by more than
  MHA_FWD_INDIFFERENCE_DELTA (2%), and every written row is proven by a
  fresh-process dispatch probe;
- shapes that already have a row for this GPU are skipped unless --all
  is given; --all --compare --update_improved re-tunes them and replaces
  a row only if the public operator got faster;
- a re-tune that finds auto-select best warns that the existing row still
  overrides it, since writing no row cannot remove one.

Candidates that fail the accuracy check are labelled mismatch rather than
crash, against the --errRatio the run was given.
amd-bartgips added a commit that referenced this pull request Sep 28, 2026
mp_tuner, base_tuner's measurement_kwargs and _read_csv fix, the
FileBaton zombie check and their tests return to #5592's version. They
now live in #5846, where the other tuners can use them, and the MHA
tuner no longer needs them. base_tuner keeps only the gpu_model filter
in run_config that tuned MHA rows rely on.
amd-bartgips added a commit that referenced this pull request Sep 28, 2026
The gate against the incumbent used 2%, while --all --compare
--update_improved keeps a row only if the public operator got at least
--min_improvement_pct (3%) faster. A 2-3% winner could be published by
the search and then be refused by the protected re-tune. The gate now
uses the same 3% and the same "at least" comparison, as
MHA_FWD_MIN_IMPROVEMENT, which is also the value the shared
PromotionPolicy in #5846 uses.
@amd-bartgips
amd-bartgips force-pushed the users/bartgips/tuning-shared-infra branch from 04a2090 to f36f909 Compare September 28, 2026 14:17
amd-bartgips added a commit that referenced this pull request Sep 28, 2026
#5846 now has one improvement bar (min_improvement_pct, 3%) for
--compare and the gate, and leaves the finalist settings to the search
that uses them. This branch adds them back as FinalistPolicy (finalists,
rounds, significance_sigma) next to RacePolicy, and changes what the bar
means:

- gate_against_incumbent takes a noise_pct floor and promotes only at
  max(min_improvement_pct, noise_pct). Before, the standard-error bar
  replaced the delta, so enough finalist rounds would publish a real but
  tiny win that --compare would then refuse.
- The floor is two combined standard errors under the exhaustive
  strategy, and the race's delta under --strategy race.
- The MHA tuner reads the bar from --min_improvement_pct, so one flag
  sets it for both the search and --compare. --delta defaults to it and
  is only needed to make the race's indifference zone differ.
- standard_error_bar and every margin are in percent, as --compare
  reports them; the evidence manifest records margin_pct, bar_pct and
  noise_floor_pct per promotion, and the promotion bar per run.
@amd-bartgips
amd-bartgips force-pushed the users/bartgips/tuning-shared-infra branch from f36f909 to 839de6b Compare September 30, 2026 10:56
amd-bartgips added a commit that referenced this pull request Oct 1, 2026
The race, resume journal, finalist rounds, standard-error gate, evidence
manifest and re-tune incumbent move to a follow-up on top of #5846, so
this PR carries only what a first tuned table needs:

- every candidate (or a seeded --candidate-sample) is measured once
  through the stock mp_tuner, alongside the auto-select incumbent and the
  shipped tile defaults;
- a winner is published only if it beats the incumbent by more than
  MHA_FWD_INDIFFERENCE_DELTA (2%), and every written row is proven by a
  fresh-process dispatch probe;
- shapes that already have a row for this GPU are skipped unless --all
  is given; --all --compare --update_improved re-tunes them and replaces
  a row only if the public operator got faster;
- a re-tune that finds auto-select best warns that the existing row still
  overrides it, since writing no row cannot remove one.

Candidates that fail the accuracy check are labelled mismatch rather than
crash, against the --errRatio the run was given.
amd-bartgips added a commit that referenced this pull request Oct 1, 2026
mp_tuner, base_tuner's measurement_kwargs and _read_csv fix, the
FileBaton zombie check and their tests return to #5592's version. They
now live in #5846, where the other tuners can use them, and the MHA
tuner no longer needs them. base_tuner keeps only the gpu_model filter
in run_config that tuned MHA rows rely on.
amd-bartgips added a commit that referenced this pull request Oct 1, 2026
The gate against the incumbent used 2%, while --all --compare
--update_improved keeps a row only if the public operator got at least
--min_improvement_pct (3%) faster. A 2-3% winner could be published by
the search and then be refused by the protected re-tune. The gate now
uses the same 3% and the same "at least" comparison, as
MHA_FWD_MIN_IMPROVEMENT, which is also the value the shared
PromotionPolicy in #5846 uses.
@amd-bartgips
amd-bartgips force-pushed the users/bartgips/tuning-shared-infra branch from 5e3eef0 to e3a353a Compare October 15, 2026 13:26
@amd-bartgips amd-bartgips changed the title [Tuning] Share mp_tuner typed statuses and add a central tuning policy [Tuning] One tuning contract: typed results, one promotion bar, fresh-process selection proof Oct 15, 2026
@amd-bartgips
amd-bartgips force-pushed the users/bartgips/tuning-shared-infra branch 2 times, most recently from 9f020c6 to c055f86 Compare October 16, 2026 08:03
@amd-bartgips amd-bartgips changed the title [Tuning] One tuning contract: typed results, one promotion bar, fresh-process selection proof [Tuning] One tuning contract: typed results, one promotion bar, selection proof and GatedTuner Oct 16, 2026
@amd-bartgips amd-bartgips changed the title [Tuning] One tuning contract: typed results, one promotion bar, selection proof and GatedTuner [Tuning] Shared tuning contract and GatedTuner Oct 16, 2026
@amd-bartgips
amd-bartgips force-pushed the users/bartgips/tuning-shared-infra branch 2 times, most recently from 5bfc443 to e5fbd05 Compare October 26, 2026 12:33
@amd-bartgips amd-bartgips changed the title [Tuning] Shared tuning contract and GatedTuner [Tuning] Per-candidate faults, selection proof and auto-select in --compare Oct 26, 2026
@amd-bartgips
amd-bartgips requested a review from yzhou103 October 26, 2026 13:18
@amd-bartgips
amd-bartgips marked this pull request as ready for review October 26, 2026 13:19
@github-actions github-actions Bot removed the FlyDSL label Nov 9, 2026
@amd-bartgips
amd-bartgips force-pushed the users/bartgips/tuning-shared-infra branch from 57f1c9e to cef3d2b Compare November 9, 2026 15:59
@amd-bartgips

Copy link
Copy Markdown
Contributor Author

Thanks @yzhou103!

gpu_model: I added it because gfx and cu_num can't tell some models apart. MI300X and MI325X are both gfx942 with 304 CUs, but MI325X has faster memory, so their tuned rows would overwrite each other. But you're right that nothing in this PR uses it, and cu_num matters far more, so it's better placed where it's actually used. It's now out of this PR completely: 6a2cc84 drops it from base_tuner, and the model detection in chip_info (with the comm_fused_moe_host refactor onto it) moves to #5762, where the MHA lookup reads it. That's also where I added the fallback you suggested: a GPU with no rows of its own uses rows that don't name a model, and otherwise rows from another model with the same gfx and cu_num.

Status results: Good idea, done in cef3d2b. Results are the plain 3-value TuneResult again, and return_status=True returns (results, statuses) alongside. The *_ in base_tuner is gone.

@yzhou103

Copy link
Copy Markdown
Contributor

Hi @amd-bartgips please resolve the conflicts

…t candidate

With return_status=True, mp_tuner returns (info, us, err_ratio, status,
detail), where status is ok, mismatch, unsupported, crash, timeout,
zero_time (still 0 us after the retries), oom_runtime, oom_preflight or
not_run.

When a worker dies, times out or its group raises, the candidate it was
running fails, what its group measured before it is kept, and the rest of the group is
resubmitted to the restarted pool, for typed and untyped callers alike. A
group that faults 5 times in a row without measuring anything returns its
remaining candidates as not_run. A fault is an AcceleratorError or an
error after which torch.cuda.synchronize() fails; the worker raises
GpuContextLost so the parent restarts the pool.
…ime auto-select

Tuned rows may carry gpu_model (chip_info.get_gpu_model, overridable with
AITER_GPU_MODEL): gfx and cu_num cannot tell MI300X from MI325X, or
MI350X from MI355X. The model comes from the HIP device name or, for the
gfx950 parts an older libdrm does not name, from the PCI device ID as
upstream libdrm's amdgpu.ids lists it. Rows without it match as before.
comm_fused_moe_host reuses chip_info's model lookup, so the PCI table
exists once.

dispatch_verification runs a row through the public op in a fresh
process, with the family's config variable pointing at the candidate CSV,
and checks the selection dispatch recorded against the one the row names.
A family opts in with SELECTION_PROBE_MODULE; run_config then verifies
each shape's row from the active config file and reports a stale or
failed row as an error. Verification and the auto-select run see the
model_configs/ merge serving sees. With COMPARE_AUTOSELECT, --compare
also times auto-select (a header-only table), and --update_improved drops
a row auto-select beats and writes no row for a candidate that does not
beat it. stale_reason lets a family mark a row its dispatch would skip,
so a plain run retunes it.
#6709 added an a_preshuffle column to tuned_grouped_fmoe.csv without a
blank-cell value, so retuning a row of the production table raises, and
two test_tuner_infra tests fail on main. grouped_moe_gfx1250 reads a
blank a_preshuffle as 0.
…batch

A tuner adds an in_datas entry for every shape, with a count of 0 when no
candidate supports the shape (gemm_a16w16 under --libtype flydsl for a
preshuffled shape, opus_gemm for a non-bf16 one). Such a shape has no task
group, so the shape-grouped path's group-count assert failed and the whole
batch was lost, under --shape_grouped and in every --mp 1 run. Zero-count
entries are now dropped before groups are matched to in_datas, so the
shape is left untuned and reported as such, as the per-candidate path
already does.
…status callers

return_status=True result was a plain 5-tuple, so under --select power its
watts read as NaN and the tune wrote no rows for that caller.
TuneStatusResult still unpacks as (info, us, err_ratio, status, detail).
…rs, as on main

A group that hits a worker missing from the PID-to-GPU map stays queued and
is resubmitted in the restart the dead worker's own fault triggers. Restarting
on the KeyError itself could restart before that fault was polled, so the
candidate that killed the worker ran again instead of failing.
Only a table the tuner wrote and times itself (--compare) stands in for the
default table and is verified with the model_configs CSVs serving merges.
A --run_config file is timed as given, so its dispatch check now reads it
the same way.
No table the shared tuner handles carries gpu_model, and neither serving
lookup nor the duplicate-shape keys read it, so a row filtered or checked by
model here could not be told apart at runtime. A family that keys its table
on the model end to end adds the check itself, and brings the model
detection with it.
A return_status result was a 5-tuple, so a family whose own overrides unpack
(info, us, err_ratio) would fail the moment it opted in. Results are the
3-value TuneResult again for every caller; with return_status=True,
mp_tuner returns (results, statuses), one (status, detail) per result in the
same order. Workers carry one private record with all fields, so the status
cannot be lost between the worker and the parent.
@amd-bartgips
amd-bartgips force-pushed the users/bartgips/tuning-shared-infra branch from cef3d2b to 453cc64 Compare November 12, 2026 09:58
@amd-bartgips

Copy link
Copy Markdown
Contributor Author

Done, rebased on main. The only real overlap was #6895's pool restart for stale PID mappings, which is kept as it is on main.

@yzhou103

Copy link
Copy Markdown
Contributor

@valar-cop re-review

@valar-cop valar-cop left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ci Triton Tests (MI35X) / Shard 6 failed — not sure yet (low): The log is empty (0 bytes), so the cause cannot be determined; the PR changes no Triton kernel or Triton test code, so a PR-caused failure cannot be established.

.valar/ci/job_133122443959.log is 0 bytes
PR diff touches no Triton kernels/tests
next: Re-run the Triton job on this head to obtain a log before attributing it. https://github.com/ROCm/aiter/actions/runs/43196136788/job/133122443959

ci Triton Test Results failed — not sure yet (low): Aggregator job fails because shard 6 failed; its own log is also 0 bytes. Main passed this job 8/8 recent runs, but with no log the failure still cannot be attributed.

.valar/ci/job_133131208863.log is 0 bytes
same job on main: 8 consecutive successes 2026-11-16..2026-11-17
next: Re-run together with shard 6; it should pass once the shard does. https://github.com/ROCm/aiter/actions/runs/43196136788/job/133131208863

# Conflicts:
#	.github/scripts/split_tests.sh
amd-bartgips added a commit that referenced this pull request Nov 17, 2026
# Conflicts:
#	aiter/ops/mha.py
@amd-bartgips

Copy link
Copy Markdown
Contributor Author

Conflicts with main are resolved in one merge commit (01c1d81, only the test list in split_tests.sh). CI is green apart from the Windows smoke job, which also fails on other PRs right now: since a recent main change, its MoE test imports aiter.fused_moe, which needs flydsl, and that isn't installed on the Windows runner. Two long jobs are still running. Could you approve if you're happy with it?

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

LGTM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.