Repository navigation
Conversation
…rface This is the last op ATOM's DeepSeek V4.1 path imports from AITER that was not routed. With it, every AITER entry point that path calls can be served by a Provider: sparse prefill (ROCm#7715), the two paged decodes (ROCm#7716, ROCm#7717), the inverse-rope quant (ROCm#7716) and both batched mxscale GEMMs (ROCm#7719). I argued earlier for holding this one back, on two grounds that did not survive checking. The first was arity: nineteen parameters fusing five stages looked like a contract too coarse to serve. Counted properly it is twelve tensors and seven shape/strategy scalars, which for an op reading q, k, v, two weight sets, the rope cache, two KV caches and two scale sets is not unusual. The second was that routing one member would drag in a family -- there are six nearby entry points differing in quant granularity, rope dimensionality and a 2way variant. ATOM imports exactly one of them, in two files. The others serve paths outside this surface and can stay unrouted without leaving a hole. Mounted on the public entry point; `@compile_ops` wraps `_fused_qk_norm_rope_cache_quant_shuffle_hip`, not the function callers import. **This contract returns None.** It is the first routed op that delivers entirely through mutation -- q, k, and the KV caches are written in place. That is a real constraint on dispatch, not just on providers: code that reads a falsy return as "the provider declined" would fall through to native after the provider had already written, running the work twice with the second pass over the first's output. Nothing in dispatch inspects return values today, and the test added here is what says so. Mutation-checked by making dispatch treat a falsy result as a decline, which turns it red on the native-fallback assertion. Decode-path op, so the first-call-under-capture consideration applies as in ROCm#7716/ROCm#7717/ROCm#7719: obligations in ROCm#7240, pinned by ROCm#7713, framework gap at ROCm/ATOM#3157. No Provider enabled means every call routes native. Baseline gains one entry, existing eight untouched. `pytest -q tests/test_plugin*.py` -- 99 passed. Verified on MI355X. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
NOT READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
|
Superseded by #7728, which carries these five commits unchanged. Combined because all five rewrite No content is lost; #7728 contains all five commits and the combined baseline was regenerated with the gate's own scanner rather than merged by hand. |
This is the last op ATOM's DeepSeek V4.1 path imports from AITER that was not routed. With it, every AITER entry point that path calls can be served by a Provider:
fused_qk_norm_rope_cache_quant_shufflemla_sparse_prefill_v41mla_decode_fwd_v4_nmmla_decode_fwd_v4_nm_psinverse_rope_group_quantbatched_gemm_a8w8_mxscale(_bpreshuffle)I argued for holding this one back. Both reasons failed checking.
"Nineteen parameters is too coarse a contract." Counted properly it is twelve tensors and seven shape/strategy scalars. For an op reading q, k, v, two weight sets, the rope cache, two KV caches and two scale sets, that is not unusual. Judging contract granularity by parameter count was the wrong instrument.
"Routing one member drags in a family." There are six nearby entry points — differing in quant granularity (
block/pts), rope dimensionality (mrope_3d), and a2wayvariant. ATOM imports exactly one of them, in two files:The other five serve paths outside this surface and can stay unrouted without leaving a hole.
This contract returns
None, and that is a constraint on dispatchIt is the first routed op that delivers entirely through mutation —
q,kand the KV caches are written in place.That matters beyond documentation. Code that read a falsy return as "the provider declined" would fall through to native after the provider had already written — running the work twice, the second pass over the first's output. Numbers would be wrong, nothing would raise.
Nothing in dispatch inspects return values today. The test added here is what says so:
Mutation-checked: making dispatch treat a falsy result as a decline turns it red on exactly the native-fallback assertion.
Mount point
Public entry point.
@compile_opswraps_fused_qk_norm_rope_cache_quant_shuffle_hip, not the function callers import.Decode path
Same consideration as #7716 / #7717 / #7719: provider obligations in #7240, pinned by #7713, framework-side gap at ROCm/ATOM#3157. With no Provider enabled, every call routes native.
Testing
pytest -q tests/test_plugin*.py— 99 passed,black/ruffclean. Baseline gains one entry, the existing eight untouched, generated with the gate's own scanner. Verified on MI355X.PR Self-Review
Reviewed revision
5f9d9977c8Behavior and intent
One decorator, one baseline entry, one test. Nothing enabled means native, so no behaviour change on merge.
The judgement worth reviewing is routing a five-stage fused op at all. A Provider must implement the whole fusion or decline — there is no partial service. That is inherent to the op existing, not something routing introduces: splitting it into five contracts would be asking AITER to give up the kernel. But a reviewer who thinks the fusion boundary itself is wrong should say so here rather than after a Provider has implemented against it.
Validation and unverified scope
Plugin suite 99 passed, gate green with the baseline regenerated by its own scanner, route verified live on MI355X, the None-return behaviour mutation-checked.
Unverified: no Provider serves this contract, so the mutation semantics — which tensors a Provider may write, and when — are stated by the op's docstring rather than checked by anything. For a contract that delivers only through mutation that gap is larger than for the others in this series.
PR-specific question
Should the other five family members be routed too? ATOM imports none of them, so this PR says no. If another model path turns out to use one, routing it later costs a baseline entry — but the family's internal boundaries would then need the same scrutiny
v4/v41got.Changed op tests
None.
aiter/ops/fused_qk_norm_rope_cache_quant.pygains a decorator and an import,tests/plugin_contracts.jsonone entry,tests/test_plugin.pyone test. No file underop_tests/is touched.🤖 Generated with Claude Code