Skip to content

[Config] remove duplicated csv row - #6332

Merged
gyohuangxin merged 1 commit into
mainfrom
dev/hotfix_yadai
Oct 9, 2026
Merged

gyohuangxin merged 1 commit into
mainfrom
dev/hotfix_yadai

Conversation

@yadaish

@yadaish yadaish commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@yadaish
yadaish requested a review from a team October 9, 2026 16:24
@yadaish yadaish changed the title remove duplicated csv row remove tuner duplicated csv row Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

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: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: 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 6332 --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.

@github-actions github-actions Bot changed the title remove tuner duplicated csv row [Config] remove duplicated csv row Oct 9, 2026
@github-actions github-actions Bot added the Config label Oct 9, 2026
@gyohuangxin
gyohuangxin merged commit 2b8885a into main Oct 9, 2026
@gyohuangxin
gyohuangxin deleted the dev/hotfix_yadai branch October 9, 2026 16:41
yzhou103 added a commit to yzhou103/aiter that referenced this pull request Oct 10, 2026
The duplicate-shape check only ran when a family had more than one table
to merge. Two short-circuits kept single-file families out of it
entirely: get_config_file returns the canonical CSV untouched when
model_configs/ has no sibling, and update_config_files returns early on
a one-element path list. A family that never grows a per-model table was
therefore never validated, and a lone CSV can still hold two rows with
the same key when a retune is appended instead of replacing the old row.

aiter/configs/tuned_grouped_fmoe.csv was in exactly that state: two rows
for gfx1250 token=512 model_dim=7168 inter_dim=3072 differing only in
tuning parameters. The row was removed in ROCm#6332, but the mechanism that
let it through was not, and test_grouped_fmoe stayed green throughout
because the resolution path it drives never reached the check.

Extract the check into _raise_on_duplicate_shapes and call it from both
paths, so the key derivation, the error text, and the keep-lowest-us
write-back stay in one place. env_name is threaded through, so the paths
reached for the first time still name the AITER_CONFIG_* variable.

Only the single-file duplicate case changes behavior: it is now reported
instead of silently accepted. Multi-file merges, and single files that
are clean, missing, header-only or unparseable, resolve as before.

_Mxfp8Config.update_config_files keeps its own single-path short-circuit;
that op validates individual rows in its loader, so its behavior does not
change.

Signed-off-by: yzhou103 <yzhou103@amd.com>
yzhou103 added a commit to yzhou103/aiter that referenced this pull request Oct 10, 2026
The self-checks only drove the cross-file merge: _build_synthetic_family
always wrote a model_configs/ sibling, so the path where a family has no
sibling and resolves to its canonical CSV directly was never exercised.
That is the path that skipped the duplicate check, which is how
tuned_grouped_fmoe.csv kept a duplicate row (removed in ROCm#6332) while
every test here was green.

Removing the row makes test_grouped_fmoe green again without proving the
check runs, so add controls that do not depend on repository data:

- a duplicate planted in a lone CSV must be reported
- two distinct shapes in a lone CSV must not be
- an unparseable lone CSV must not raise out of get_config_file, since
  this path used to hand the file back unread and the parse error
  surfaced from the op's own loader

_build_synthetic_family takes with_model_file to choose the path and
canonical_raw for malformed input. _run_synthetic now catches Exception
rather than RuntimeError: pandas' ParserError is a ValueError, so the
malformed case has to be observable rather than escaping as a test error.

Verified by mutation: reverting the single-file check fails only the
first, and dropping the parse guard fails only the third.

Signed-off-by: yzhou103 <yzhou103@amd.com>
yzhou103 added a commit that referenced this pull request Oct 14, 2026
* [Config] Check single-file tuned configs for duplicate shapes

The duplicate-shape check only ran when a family had more than one table
to merge. Two short-circuits kept single-file families out of it
entirely: get_config_file returns the canonical CSV untouched when
model_configs/ has no sibling, and update_config_files returns early on
a one-element path list. A family that never grows a per-model table was
therefore never validated, and a lone CSV can still hold two rows with
the same key when a retune is appended instead of replacing the old row.

aiter/configs/tuned_grouped_fmoe.csv was in exactly that state: two rows
for gfx1250 token=512 model_dim=7168 inter_dim=3072 differing only in
tuning parameters. The row was removed in #6332, but the mechanism that
let it through was not, and test_grouped_fmoe stayed green throughout
because the resolution path it drives never reached the check.

Extract the check into _raise_on_duplicate_shapes and call it from both
paths, so the key derivation, the error text, and the keep-lowest-us
write-back stay in one place. env_name is threaded through, so the paths
reached for the first time still name the AITER_CONFIG_* variable.

Only the single-file duplicate case changes behavior: it is now reported
instead of silently accepted. Multi-file merges, and single files that
are clean, missing, header-only or unparseable, resolve as before.

_Mxfp8Config.update_config_files keeps its own single-path short-circuit;
that op validates individual rows in its loader, so its behavior does not
change.

Signed-off-by: yzhou103 <yzhou103@amd.com>

* [Config] Cover the single-file path in the collision self-checks

The self-checks only drove the cross-file merge: _build_synthetic_family
always wrote a model_configs/ sibling, so the path where a family has no
sibling and resolves to its canonical CSV directly was never exercised.
That is the path that skipped the duplicate check, which is how
tuned_grouped_fmoe.csv kept a duplicate row (removed in #6332) while
every test here was green.

Removing the row makes test_grouped_fmoe green again without proving the
check runs, so add controls that do not depend on repository data:

- a duplicate planted in a lone CSV must be reported
- two distinct shapes in a lone CSV must not be
- an unparseable lone CSV must not raise out of get_config_file, since
  this path used to hand the file back unread and the parse error
  surfaced from the op's own loader

_build_synthetic_family takes with_model_file to choose the path and
canonical_raw for malformed input. _run_synthetic now catches Exception
rather than RuntimeError: pandas' ParserError is a ValueError, so the
malformed case has to be observable rather than escaping as a test error.

Verified by mutation: reverting the single-file check fails only the
first, and dropping the parse guard fails only the third.

Signed-off-by: yzhou103 <yzhou103@amd.com>

* [Config] Keep the duplicate diagnostic when a source cannot be rewritten

The dedup write-back runs before the RuntimeError that reports the
duplicates, so a source that cannot be written replaces that diagnostic
with a bare PermissionError. That drops the dedup key and the
AITER_CONFIG_* hint precisely in a read-only install or container, which
is the environment those were added for (#6307, #5184), and
abandons any remaining source half-rewritten.

Catch OSError per source, collect the failures, and report them under
"Not updated" without counting them as updated. The resolution line now
says not every file could be rewritten when that happened, so the message
cannot claim a write that did not land.

This affected merges before and now also affects lone config files, since
those reach the same write-back.

Reported by Copilot review.

Signed-off-by: yzhou103 <yzhou103@amd.com>

---------

Signed-off-by: yzhou103 <yzhou103@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants