Repository navigation
fix(attention): accept optional explicit FlyDSL plans - #3052
Conversation
Final aiter #7205 keeps the explicit-plan API but gives work_plan a None default. Accept both required and optional-None signatures because ATOM always passes the plan explicitly. Co-authored-by: Cursor <cursoragent@cursor.com>
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
|
valar-cop
left a comment
There was a problem hiding this comment.
a few small things..
any startup log or accuracy from the MiniMax-M3 TP1/DP4/EP4 run on gfx1250?
ci green.
|
The fix is right and the breakage is real — I reproduced it against aiter But I think the aiter didn't make the plan optional — it made it optional for MXFP4. From # docstring
``work_plan`` is required and must be built with ``plan_pa_decode`` before calling decode.
``work_plan=None`` is accepted for MXFP4 only: one task per sequence
# body
if not isinstance(work_plan, PADecodePlan) and not (mxfp4 and work_plan is None):
raise TypeError("work_plan must be a PADecodePlan")So the two defaults map to post-#5809-pre-MXFP4 and post-#5809-post-MXFP4. Neither maps to "predates #5809" — an aiter that old has no
The only row where this PR and removal differ is
→ Change: drop the clause so the probe matches the idiom used in the rest of the file. Neither accepted shape is pinned by a test. Two mutations, both green on
→ Change: if the clause stays, add a The warning misdiagnoses the failure it was just hit by. → Change: log which clause failed and the observed signature, instead of attributing every failure to an old aiter. One more on the new test's docstring — "aiter may also allow callers to omit it" reads as a general loosening; per aiter's own docstring and body it holds for MXFP4 only, and omitting it elsewhere raises. Suggest something like "aiter gives it a default for its MXFP4 path; ATOM still always passes one." Not verified: I have no gfx1250, so I did not reproduce the MiniMax-M3 startup failure or run TP1/DP4/EP4 — the data valar-cop is asking for. Everything above is at the signature level and does not exercise the kernel. I'm also not repeating valar-cop's two points; both still look open. |
aiter #7056 defaults work_plan to None for MXFP4. ATOM always passes a plan, so drop the default check and log the observed signature when the probe fails. Co-authored-by: Cursor <cursoragent@cursor.com>
|
All four points are in The new warning is a real improvement. It showed up in my own mutation output, which is a decent demonstration of it: Someone debugging a gfx1250 startup now sees the signature instead of being told their aiter is too old. One thing: the test grew from 2 cases to 5, but it still pins only one of the four clauses. Deleting each clause in turn and running the file (baseline 169 passed):
The reason is in the two cases that expect def pre_5809(output, query, work_plan=None): # no max_context_length
def no_bound(output, *a, work_plan, sinks=None): # no max_context_lengthBoth are rejected for the missing That matters here more than it usually would: this probe's whole history is breaking because it checked one thing too many. If anyone tightens or relaxes the remaining three, nothing goes red. → Change: three one-line fakes, each isolating one clause, all expecting def positional_plan(output, work_plan=None, max_context_length=None): # kind
def no_plan(output, *a, max_context_length=None): # plan is not None
# plus one case with monkeypatch.delattr(mod, "plan_pa_decode")Minor: in the |
Give each rejected fake exactly one missing piece so every clause is covered, and report an import failure as such in the warning. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@yitingw1 Thanks, both addressed in 210abf0:
|
Brings in main through 03b584b (ROCm#3109 V4.1 gfx1250 single-launch decode step, ROCm#3169, ROCm#3167, ROCm#3052, ROCm#3073, ROCm#3153, README news). One conflict, in model_runner.py: ROCm#3109's step override (`_step_override` / `_served`) and this branch's model head output (`compute_head`) sit side by side, in __init__ and as two branches of postprocess's verdict (a tuple head output; an overridden step's `verify_outputs`). The two are exclusive: an overridden step returns no head output. The hi runner test's stand-in runner gains ROCm#3109's `_served` and the stream argument of `forward_done_event.record`.
Problem
ATOM detects aiter's explicit FlyDSL PA-plan API (ROCm/aiter#5809) by requiring
work_planto be keyword-only with no default. ROCm/aiter#7056 gavework_planaNonedefault for its MXFP4 path (other paths still require a plan), so current aiter main is rejected as predating #5809. On gfx1250, MiniMax-M3 has no gluon fallback and fails model startup.Change
plan_pa_decode, a keyword-onlywork_plan, andmax_context_length. The default ofwork_planis no longer checked: ATOM builds and passes the plan explicitly at every call site, so a default has no bearing on the call. This matches the other aiter capability probes (e.g.max_batch_sizein the same file).work_plan=None, nomax_context_length) is still rejected.pa_decodesignature (or the import error) instead of always blaming an old aiter.Validation
tests/test_paged_attention_dispatch.py+tests/test_minimax_m3_sparse_pa_floor.py: 182 passed on gfx1250, against both an aiter with the requiredwork_planand one withwork_plan=None(post-#7056)Noneand other defaults, and rejects one fake per clause. Deleting any of the four clauses, or re-addingdefault is empty,default is Noneordefault in (empty, None), fails it.ATOM_PA_FLYDSL=1: on main the probe isFalseandrun_pa_decoderaises "no gluon fallback"; with this PR, one BF16 decode through FlyDSL matches a torch reference (max abs err 0.002 atqlen=1, 0.003 atqlen=2)075695e8)pa_decodeverified from source: keyword-onlywork_plan: PADecodePlan | None = NoneTracked while validating MiniMax-M3 TP1/DP4/EP4 on MI455X.