Repository navigation
[JIT] Route five ops through the provider interface, and let a compiled op report its signature - #7484
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
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 |
1472e3c to
ee9687a
Compare
9212c0b to
cea956b
Compare
e83613f to
f75ce65
Compare
b67aabd to
d1ab2e6
Compare
eadb134 to
031bc35
Compare
Its select() read args[0] for both contracts to find the hidden size. That works today by coincidence: the functional contract takes the input first and the write-out one takes the output, and both happen to carry the hidden size in the same axis. It would break silently the first time a contract's parameter order moved, and the failure would be a wrong coverage decision rather than an error. The provider source in this file is written out in full because it doubles as the answer to "what does a provider ship". Something written to be copied should demonstrate the careful version, so it now names which argument carries the shape for each contract, and the comment says why reading one position for both is the wrong habit. Co-Authored-By: Claude Code <[email protected]>
The GEMM pilot routes gemm_a8w8_blockscale and gemm_a8w8_blockscale_bpreshuffle as they already exist. AITER exposes the shuffled-b weight layout as its own public function; that is a layout rather than a backend, and whether the two should converge is ROCm#7150's question. Routing them unchanged keeps this pilot out of a public API change. The two are not independent: gemm_a8w8_blockscale with isBpreshuffled delegates to the other one's E8M0 route, so both are recorded in the contract baseline rather than only the entry a caller is likeliest to name. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
rmsnorm is at version 2 and accepts only version 2; the gate now reads that from the file rather than from a default. A later edit adding version 1 back has to change this line, which is the point: it moves no signature and no fingerprint, so nothing else would show it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
"capture" appeared nowhere in this tree -- not in the module, not in a test -- while the RFC names graph capture as part of the contract. It is the quietest failure mode in the design: replay runs no Python, so whatever dispatch decided on the capturing call is what the graph does for its whole life, and because replay records no Decision, nothing afterwards says which call decided it. A first call that landed inside capture could freeze an op on the wrong route with no observable trace. Measured on an MI355X before writing the tests: select() is called once during capture and zero times across three replays, and last_decision() after replay still describes the capturing call. Two tests hold it: - a provider selected at capture stays selected; replays add no Decision at all, and the reading still describes the capturing call, which is precisely why an operator cannot tell replays apart from it; - AITER_PLUGINS=0 does not reach an already-captured graph. The switch stops future dispatch; it cannot un-bake a kernel, because there is no dispatch left inside the graph to stop. Anyone reaching for it during an incident needs to know the graphs have to be rebuilt. Both run on a real device (8x gfx942 here) rather than being skipped, and both were mutation-checked: breaking each assertion's premise turns them red. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
On the day this merges, every caller is in the state where no provider is enabled -- and that state walked eligibility and built a frozen Decision for a call that no provider could possibly serve. Measured here: 1.902us per routed call against the kill switch's 0.137us. Five routed ops, rmsnorm twice per layer, is roughly 0.23ms of CPU per decode step in eager mode. It is a pure loss: nobody paying it gets anything back. An empty enable list and the kill switch say the same thing -- no provider can serve this call -- so dispatch now treats them as one branch and goes straight to native. 1.902us -> 0.149us, which is what the kill switch costs. Profiling first, because the expensive half was not the one I expected: _config() 0.036us _eligible() 0.109us (cache hit) _run_native() 1.613us of which Decision(...) alone is 0.863us A frozen dataclass costs more to build than everything else on the path put together. Skipping the branch skips both. The cost is that these calls record no Decision, so last_decision() and decision_counts() stay empty while nothing is enabled. Same trade the kill switch already makes. explain() and status() still answer in full, on demand, and three tests now say so rather than leaving it to the commit message. Two things fell out of the change that were defects, not consequences: - last_decision() would have returned the *stale* provider route after configure(enable=()) turned routing off. Its docstring already argued why that is worse than returning nothing -- for the kill switch. The read now applies the same rule to both states. - the route-change log lost its most useful line. An op with no entry was treated as having no comparable past, so the first provider route after a framework enables one was recorded as a silent baseline. What it was doing before is not unknown -- it was running native -- so that transition is now an audit line, which is the one an operator most wants. Tests: the three that used default-deny as a convenient "no provider" fixture now use an enabled provider that declares another contract version, so the recording path keeps its coverage instead of losing it to the shortcut. The overhead file gains a second machine-independent gate: nothing-enabled must cost within 3x of the kill switch, which the 1.9us path would fail. pytest -q tests/ -- 318 passed, 1 skipped, 463 subtests, on 8x gfx942. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
391ddac to
9af4680
Compare
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
The interface is on main and nothing says how to use it. The next library that wants to serve an op has to read 1200 lines of implementation to find out that installing a provider does nothing until a framework calls configure(), or that `select()` has to be pure because `explain()` calls it without running anything. Deliberately not a second RFC. ROCm#7240 holds the rationale, the open questions and the deprecation policy; this holds the smallest provider that works, the entry point declaration, what `select()` must honour, and the four reads that answer "I installed it and nothing happens". Two things stated here that are easy to get wrong by omission: - **no op is routed on main today.** The interface is complete and tested, and the first ops to pass through it arrive in ROCm#7484. A provider can be written, installed, enabled and inspected right now, and every call still goes native. Saying so is better than letting someone conclude their provider is broken. - **nothing checks your `run` against the contract yet.** The arity check comes with ROCm#7484. Until then a kernel bound to the wrong contract runs silently. The failure section is four things that cost real debugging time on the first provider to use this interface, rather than invented examples: a kernel bound to a layout instead of a contract; matching hardware on `get_device_name()` (which reads "AMD Radeon Graphics" on MI355X under rocm/atom-dev) instead of `gcnArchName`; reporting offline validation timings as if they described the call in hand; and treating a decline as a failure. The arity point is worth the space it takes. Even once ROCm#7484 lands, the check compares argument counts, not meaning — `mla_sparse_prefill_v4` and `_v41` both take 15 arguments and their second parameter is `q_rope` in one and `q_scale` in the other. A provider bound to the wrong one reads a scale tensor as a RoPE component with every gate green. Every API name, keyword, status() key and reason string in this file was checked against the module on this commit. The one reference to something that does not exist on main yet (`contract-mismatch`) is marked as arriving with ROCm#7484. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Three statements in this file were written against a main where the interface existed and nothing used it. ROCm#7484 changed that, and ROCm#7654 adds the cost field, so: - "no op is routed on main today" becomes the actual list of five, with the pointer to tests/plugin_contracts.json as the description that cannot drift; - "nothing checks your run against the contract yet" becomes the arity check that now exists — and keeps the warning that matters more, that arity is not meaning: v4 and v41 both take 15 arguments with a different second one; - a section on `latency_us`: what it means, why an offline validation ratio is not it, and why omitting beats extrapolating. Documentation that describes a main it is not merging into is worse than none, which is why this waits for ROCm#7654 rather than landing in two passes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…l library (#7695) * Write down how to serve an AITER op from out of tree The interface is on main and nothing says how to use it. The next library that wants to serve an op has to read 1200 lines of implementation to find out that installing a provider does nothing until a framework calls configure(), or that `select()` has to be pure because `explain()` calls it without running anything. Deliberately not a second RFC. #7240 holds the rationale, the open questions and the deprecation policy; this holds the smallest provider that works, the entry point declaration, what `select()` must honour, and the four reads that answer "I installed it and nothing happens". Two things stated here that are easy to get wrong by omission: - **no op is routed on main today.** The interface is complete and tested, and the first ops to pass through it arrive in #7484. A provider can be written, installed, enabled and inspected right now, and every call still goes native. Saying so is better than letting someone conclude their provider is broken. - **nothing checks your `run` against the contract yet.** The arity check comes with #7484. Until then a kernel bound to the wrong contract runs silently. The failure section is four things that cost real debugging time on the first provider to use this interface, rather than invented examples: a kernel bound to a layout instead of a contract; matching hardware on `get_device_name()` (which reads "AMD Radeon Graphics" on MI355X under rocm/atom-dev) instead of `gcnArchName`; reporting offline validation timings as if they described the call in hand; and treating a decline as a failure. The arity point is worth the space it takes. Even once #7484 lands, the check compares argument counts, not meaning — `mla_sparse_prefill_v4` and `_v41` both take 15 arguments and their second parameter is `q_rope` in one and `q_scale` in the other. A provider bound to the wrong one reads a scale tensor as a RoPE component with every gate green. Every API name, keyword, status() key and reason string in this file was checked against the module on this commit. The one reference to something that does not exist on main yet (`contract-mismatch`) is marked as arriving with #7484. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Bring the guide up to what main actually does Three statements in this file were written against a main where the interface existed and nothing used it. #7484 changed that, and #7654 adds the cost field, so: - "no op is routed on main today" becomes the actual list of five, with the pointer to tests/plugin_contracts.json as the description that cannot drift; - "nothing checks your run against the contract yet" becomes the arity check that now exists — and keeps the warning that matters more, that arity is not meaning: v4 and v41 both take 15 arguments with a different second one; - a section on `latency_us`: what it means, why an offline validation ratio is not it, and why omitting beats extrapolating. Documentation that describes a main it is not merging into is worse than none, which is why this waits for #7654 rather than landing in two passes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: zufayu <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
DeepSeek V4.1's attention path calls six AITER ops and not one of them is routed: the five ops ROCm#7484 routed are rmsnorm, pertoken_quant and the two blockscale GEMMs, which the V4.1 path does not touch. A provider can serve nothing on that model today. This routes the one of the six that needs no other decision first. **Why this one.** Five of the six run only on the decode path, which is inside a CUDA graph, and `warmup_model()`'s dummy batch is prefill-only — so their first call lands in a capture, the case ROCm#7240 now states obligations for and ROCm#7713 pins. `mla_sparse_prefill_v41` is prefill. It is reached outside any capture, so routing it exercises the DSV4.1 contract end to end without depending on anything else landing first. **Mounted where the op begins.** `@compile_ops` wraps only the low-level asm entry point; the public `mla_sparse_prefill_v41` is plain Python, so the route sits on the contract rather than on one backend's implementation — the lesson from routing rmsnorm at `_rms_norm_fwd_dispatch`. **Not folded in with v4.** `mla_sparse_prefill_v4` stays unrouted and will be its own contract when it is. The two take the same fifteen arguments and mean different things by them — v4's second is `q_rope`, v41's is `q_scale` — so a kernel bound to the wrong one passes the arity check and reads a scale tensor as a RoPE component. ROCm#7240 states the rule. **`backend=` needs no special handling.** It is a contract parameter, not a routing switch (ROCm#7240), and on this op it is degenerate anyway: `"opus"` is the only accepted value, both spellings reach the same implementation, and ATOM's call site passes neither. The baseline gains one entry and the existing five are untouched, which is the property worth checking in the diff. `pytest -q tests/test_plugin*.py` — 98 passed. On MI355X, `plugin.status()["routed_ops"]` lists six ops with `mla_sparse_prefill_v41` among them. No provider serves it yet, so every call still routes native, exactly as the first five did when they landed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…raph capture (#7713) * Pin what a provider's first call may do inside a capture #7484 pinned what replay does to a routing decision. Neither of those tests covers the case a real deployment hits first: an op whose first call lands *inside* a capture, because the warmup pass did not reach it. The existing `_capture` helper warms before recording, by design -- so the uncovered path is the one the helper exists to avoid. That path is not hypothetical in this tree. `capture_cudagraph()` calls `warmup_exchange()` before recording because `warmup_model()`'s dummy batch is prefill-only, and an all-to-all on the decode path would otherwise set up its NCCL peer connections inside the capture, where that hangs. A decode-only routed op is in exactly that position. Two tests, answering the two questions a provider author has. **Can I allocate lazily?** Yes, and the test says so because the intuition runs the other way. Capture-time allocations are widely assumed to land in the graph's private pool and die with it. Measured: 16 MiB allocated on a first call inside a capture belongs to the provider, survives the graph, same address. A provider does not need to pre-allocate to be correct -- an obligation worth not imposing. **Can I read a result back?** No, and the refusal is not recoverable. The second assertion is the one that matters: after the failure the CUDA context is unusable, and the next unrelated `torch.rand` fails naming neither capture nor the provider. The cost of a `logger.info(f"...{probe.item()}")` in a lazy init is not an error in that init; it is every CUDA operation in the process afterwards, reported somewhere else. That test runs in a subprocess, and the reason is the finding itself: proving this ruins the process that proves it. Run inline, it fails every CUDA test after it in this file -- including #7484's own capture tests, which is how the behaviour was found. An earlier draft parametrised five readback forms inline; the first passed and poisoned the other four. Verified on MI355X (gfx950, torch 2.10.0+rocm7.2.4): 13 passed, including the pre-existing tests that the inline version took down. Not runnable on a checkout whose flydsl predates the pin main now requires -- `requires_built_aiter` skips the module there rather than failing it. The obligation these pin is stated in #7240. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Record that both capture assertions were mutation-checked Swapping the probe's `.item()` for a `torch.empty` -- legal under capture -- reports NOT_REFUSED and CONTEXT_SURVIVED, failing both assertions. Without that, the test could have passed for a reason other than the one it names, and the next person would have to rerun the experiment to find out. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: zufayu <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
… an out-of-tree provider AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
* Route mla_sparse_prefill_v41, the first DSV4.1 op DeepSeek V4.1's attention path calls six AITER ops and not one of them is routed: the five ops #7484 routed are rmsnorm, pertoken_quant and the two blockscale GEMMs, which the V4.1 path does not touch. A provider can serve nothing on that model today. This routes the one of the six that needs no other decision first. **Why this one.** Five of the six run only on the decode path, which is inside a CUDA graph, and `warmup_model()`'s dummy batch is prefill-only — so their first call lands in a capture, the case #7240 now states obligations for and #7713 pins. `mla_sparse_prefill_v41` is prefill. It is reached outside any capture, so routing it exercises the DSV4.1 contract end to end without depending on anything else landing first. **Mounted where the op begins.** `@compile_ops` wraps only the low-level asm entry point; the public `mla_sparse_prefill_v41` is plain Python, so the route sits on the contract rather than on one backend's implementation — the lesson from routing rmsnorm at `_rms_norm_fwd_dispatch`. **Not folded in with v4.** `mla_sparse_prefill_v4` stays unrouted and will be its own contract when it is. The two take the same fifteen arguments and mean different things by them — v4's second is `q_rope`, v41's is `q_scale` — so a kernel bound to the wrong one passes the arity check and reads a scale tensor as a RoPE component. #7240 states the rule. **`backend=` needs no special handling.** It is a contract parameter, not a routing switch (#7240), and on this op it is degenerate anyway: `"opus"` is the only accepted value, both spellings reach the same implementation, and ATOM's call site passes neither. The baseline gains one entry and the existing five are untouched, which is the property worth checking in the diff. `pytest -q tests/test_plugin*.py` — 98 passed. On MI355X, `plugin.status()["routed_ops"]` lists six ops with `mla_sparse_prefill_v41` among them. No provider serves it yet, so every call still routes native, exactly as the first five did when they landed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Route the two decode-path V4.1 ops whose contracts need nothing new outside a graph capture. These are the next two, chosen because their contracts raise no question this interface has not already answered: nine arguments each, no workspace, no backend parameter, no backend word in the name — the same shape as the five ops already routed. Both mount on the public entry point. `@compile_ops` wraps `_inverse_rope_group_quant_kernel`, not the function callers use, so the route sits on the contract rather than on one backend's implementation. **These are decode-path ops, and that has a consequence worth stating here rather than discovering later.** A framework's warmup runs a prefill-only dummy batch, so a decode-only op is not called during warmup and its first call lands inside `capture_cudagraph()`. Allocation there is safe; reading a result back is not, and the failure poisons the CUDA context rather than raising something a provider author can act on. The obligation this places on providers is in ROCm/ATOM#3157. Routing them now is still correct: with no provider enabled, dispatch short-circuits before eligibility and every call goes native, so nothing changes for anyone today. What it buys is the contract being in place, so a provider can be written against it while the framework-side warmup is sorted out. The ordering risk is real but it is a deployment-time risk, not a merge-time one, and it is documented in both places a provider author would look. `fused_qk_norm_rope_cache_quant_shuffle` is deliberately not here: nineteen arguments fusing norm, rope, cache, quant and shuffle is a contract-granularity question for #7240, and routing it first would freeze that granularity into public contract. `mla_decode_fwd_v4_nm_ps` is also held back — it carries a workspace, and no provider has ever served a contract with one, so it deserves a PR that can say something about that rather than riding along in this one. The baseline gains two entries and the existing five are untouched. Generated with the gate's own `routed_contracts()` scanner. `pytest -q tests/test_plugin*.py` — 98 passed. On MI355X, `plugin.status()["routed_ops"]` lists seven ops with both of these among them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Route the first contract that carries a workspace, and check what that means handle. Until now that was an assertion nobody had executed: no routed op had one, so nothing in the tree demonstrated it, and nothing would have noticed if it stopped being true. `mla_decode_fwd_v4_nm_ps` takes `MlaV4NmPsWorkspace`, a NamedTuple of five tensors the caller allocates through `get_mla_v4_nm_ps_workspace`. Routing it makes the claim testable, and the test is the point of this PR rather than the decorator. The question the claim hides is concrete. Dispatch canonicalizes arguments through generated code before handing them to a Provider, and a NamedTuple could plausibly arrive rebuilt, flattened into its fields, or copied. Any of those breaks the ownership the pattern exists for: the Provider would be writing into scratch the caller cannot read back, and nothing would say so. It arrives as the same object. The test asserts `is`, not `==`, on the way into `select()` and again on the way into `run()`, checks the field names survive, and checks that defaults past the workspace are still canonicalized into positional arguments. Mutation-checked by making dispatch rebuild NamedTuples after canonicalization, which turns it red on the first assertion. Worth stating what this does not establish: no Provider has served this contract against real V4.1 tensors, and the workspace's *lifetime* rules -- who may write to it, when it may be reused -- are semantics the contract carries, not something argument passing can check. Decode-path op, so the first-call-under-capture consideration from #7716 applies here too: provider obligations in #7240, pinned by #7713, framework gap filed as ROCm/ATOM#3157. With no Provider enabled, every call routes native and nothing changes on merge. Baseline gains one entry, existing six untouched, generated with the gate's own scanner. `pytest -q tests/test_plugin*.py` -- 99 passed. On MI355X, `plugin.status()["routed_ops"]` lists it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Route both batched mxscale GEMMs, and pin why they stay two The last V4.1 op this series routes is `batched_gemm_a8w8_mxscale_bpreshuffle`. Routing it alone would have been wrong: its non-shuffled sibling `batched_gemm_a8w8_mxscale` takes the same five arguments and is reached from the same path, so leaving one unrouted would let a Provider serve half the pair and look complete. Both are routed here. They get the same fingerprint, and that is correct rather than a bug in the gate. The gate reads signatures, and these signatures are identical: `x, wo_a, x_scale, w_scale, dtype`. What separates them is the *content* of `wo_a` -- row-major in one, baked into the (16, 16) MFMA-fragment layout in the other -- with the same shape, dtype and strides either way. AITER already says what that costs, in the entry point's own docstring: That is why it is a separate entry rather than a flag: the shuffled weight has the same shape, dtype and strides as the row-major one, so a mismatched kernel reads the right bytes in the wrong order and returns a plausible wrong answer instead of failing. This is the sharpest case of what #7240 states about contract granularity. `v4`/`v41` at least differ in parameter names; here nothing differs. Neither the contract gate nor the candidate arity check can tell a kernel bound to the wrong one apart, and there is no downstream mechanism that recovers. So the test added here does not assert correctness -- nothing available can. It asserts that the pair stays a pair. The two look like an obvious duplicate, so the plausible way to break this is a later cleanup routing one and calling the other redundant; the assertion makes that delete an explanation rather than a line. First draft of it skipped when an op was missing, which let exactly that mistake pass -- mutation-checked after the fix: removing either route turns it red. Decode-path ops, so the first-call-under-capture consideration from #7716 and #7717 applies: obligations in #7240, pinned by #7713, framework gap filed as ROCm/ATOM#3157. With no Provider enabled every call routes native. Baseline gains two entries, existing seven untouched. `pytest -q tests/test_plugin*.py` -- 99 passed. On MI355X both appear in `plugin.status()["routed_ops"]`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Route the fused qk-norm/rope/cache/quant op, completing V4.1's API surface 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 (#7715), the two paged decodes (#7716, #7717), the inverse-rope quant (#7716) and both batched mxscale GEMMs (#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/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]> --------- Co-authored-by: zufayu <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
… an out-of-tree provider (#6689) AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
… an out-of-tree provider (#6689) AITER keeps the op contract and the aiter.plugin routing surface; the gemm_fusion framework, kernels, configs, runtime and evidence move to the plugin_poc provider. The plugin interface is staged byte-identically from PR #7484 so this branch is testable before #7484 lands. - aiter/plugin/: staged #7484 interface. - aiter/ops/gemm_fusion/sp_qkv: route-only neutral op (route(op=..., version=1)) on the existing flat 15-arg signature; native body raises NoKernelProviderError; CONTRACT.md rewritten for the contract/provider model. - aiter/__init__.py: lazy sp_qkv_fused export; sp_qkv_covers removed. - op_tests/test_gemm_fusion_sp_qkv_op.py: CPU-only registration/no-provider/fake- provider/kill-switch/contract-mismatch/decline tests. - Removed from aiter (now in plugin_poc feat/sp-qkv-aiter-provider): aiter/gemm_fusion, aiter/ops/gemm_fusion/sp_qkv implementation, csrc/gemm_fusion, configs and the implementation docs/tools/tests. CPU gate: pytest op_tests/test_gemm_fusion_sp_qkv_op.py -q -> 7 passed.
The first actual use of the interface. #7465 builds the mechanism and #7466
makes its tests block CI, but until this PR nothing in AITER is routed — the
machinery is complete, tested, and unused.
This routes five ops, fixes the one thing in AITER that made routing
impossible, and demonstrates an external provider serving through it on real
hardware.
Builds on #7466. Review the last nine commits only. This is also the PR
that changes
aiter/jit/utils/torch_guard.py, so it wants a JIT revieweralongside an op owner.
A compiled op could not report its own signature
torch_compile_guardreturns a(*args, **kwargs)closure and does not usefunctools.wraps, soinspect.signature()of any guarded op — which isevery
@compile_opsfunction, and several that use the guard directly —reported the closure's parameters rather than the op's.
This is a prerequisite, not a side change.
route()captures the publicsignature as the op contract, and against
(*args, **kwargs)there is nocontract: no per-op binder can be generated, so every call pays
Signature.bind— sixty times the cost measured in #7465 — andapply_defaults()has no defaults to apply, so a provider'sselect()wouldsee a different number of arguments depending on how the caller spelled the
call.
The guard already knows the original as
calling_func_; it now exposes it onevery path it returns, which covers both its own users and
compile_ops'.Blast radius: this changes what introspection reports for every compiled op
in the tree, which is why it is called out rather than buried. Both wrappers
are plain Python functions, not
OpOverloadPacket, so the assignment cannotraise; it happens after
torch.libraryregistration; and nothing else in thetree reads
__wrapped__on these. Both tests intests/test_jit_signature.pyfail without it — verified by reverting it.
Where the routes sit, and why it moved
Five ops are routed:
rmsnorm,rmsnorm_with_add,pertoken_quant,gemm_a8w8_blockscaleandgemm_a8w8_blockscale_bpreshuffle. Allstay native by default; routing only changes what happens once a provider is
explicitly enabled.
rmsnormwas first routed at the low-level HIP binding behindmodule_rmsnorm_quant— a public name only because the module isstar-imported, but in substance one backend's entry point. That was wrong and
this PR corrects it. A provider declaring op
rmsnormsaw neither publicspelling:
rms_normandrmsnorm2d_fwdboth call_rms_norm_fwd_dispatchdirectly, and that function chooses between the HIP binding and opus. The opus
path could not reach a provider at all, and the op name was backend-neutral
while what it resolved to was not — the same defect #7150 exists to remove, one
level further down.
The route now sits on
_rms_norm_fwd_dispatch: below both public spellings,above the backend choice. Downstream is unaffected — vLLM calls
rms_norm,ATOM calls
rmsnorm2d_fwd, and neither changes.That move changed the contract's shape, from write-out to functional, so the
version went to 2 — and deliberately not as a
supersedesof version 1. Aprovider written against v1 handed a v2 call would treat the input tensor as its
output buffer.
supersedes=means "still acceptable", which this is not. Thecontract gate caught the change and required the bump, which is what it is for.
What these mount points cover, stated because a provider author will look
here for it:
rmsnormandrmsnorm_with_addnow cover both public spellings and bothbackend branches.
rmsnorm_with_addisrmsnorm2d_fwd_with_add, the per-layer residual-addpath vLLM, SGLang and ATOM call. It dispatches to a different kernel and has a
second output, so it is a separate contract rather than a shape of the first.
pertoken_quantis the torch reference implementation rather than aproduction kernel, and it is reused by
per_block_quant_wrapper, so servingit also serves the per-block quant torch path.
the shuffled-b weight layout as its own public function; that is a layout
rather than a backend, so the name is allowed, but the two are not
independent --
gemm_a8w8_blockscalewithisBpreshuffleddelegates to theother one's E8M0 route. Whether they should converge is RFC: decouple backend names from public op definitions (start with MoE) #7150's question, and
routing them unchanged keeps this PR out of a public API change.
A kernel is checked against the contract before it is accepted
A declared op version is a provider's claim that it implements a contract.
Nothing checked the claim, and the failure when it is wrong is silent: a kernel
written for a write-out contract, handed a functional one, has argument counts
that line up by accident and writes its result into the caller's input. Four
positional arguments into a five-parameter function with one default raises
nothing — verified.
A candidate's kernel is now bound against the contract's shape before it is
accepted, and one that cannot take the call is refused with reason
contract-mismatch. A*args, **kwargsforwarder passes, which is right: itdoes accept the call. Checked once per kernel and remembered, so the hot path is
one dictionary lookup — 0.14µs.
It catches shape, not meaning. A contract whose parameters are unchanged and
whose semantics moved is what the version number is for, and nothing automatic
can see it. The two are complements.
With the check in place, the version can stop being ceremony.
route(op=...)defaults to version 1, so an op whose contract has never movedsays nothing about versions. A provider may list op names instead of mapping
them to versions —
op_versions = {"rmsnorm"}means whichever is current — andone spanning a contract change still declares explicitly. That default is only
safe because of the check: a provider meaning "current" while built against an
older shape is refused rather than run.
An external provider serving, end to end
The milestone's remaining condition. A reference provider arrives the way a real
one does — a package and a
.dist-infoonsys.path, found throughimportlib.metadata, nothing monkeypatched into discovery — and servesrmsnorm2d_fwdend to end, checked against the op's own arithmetic so the testproves it computed the op rather than merely claimed the route. The same
provider declines
pertoken_quant, and declines per call for a shape it doesnot cover.
The provider source is written out in full in the test rather than hidden in a
fixture, because it doubles as the answer to "what does a provider ship": a
name, the API versions it supports, the op versions it serves, a
select()thatmay decline, and an evidence reference AITER records without interpreting.
Beyond the tests, this was also run against AKLR
(https://github.com/AMD-AGI/AKLR) on MI355X, for both the normalization and the
GEMM pilots, with no AITER code special-cased for it.
rmsnorm_with_add: AKLR served the residual-add contract with output matchingthe reference to 3.9e-3 and the residual output exact, serving some token counts
and declining others for its own reasons.
gemm_a8w8_blockscale_bpreshuffle, m x 4096 x K in fp8 with per-128-blockscales:
run()The run predates #7465's consolidation of the enablement controls, so the
script enabled AKLR through
AITER_PLUGIN_ENABLE; the same run today setsconfigure(enable=("aklr",), source=...)and routes identically.The third row is the failure boundary doing its job: the kernel failed inside
run()on this host's flydsl build, and the error propagated rather thanfalling back, which is what the RFC requires once execution has begun. The
native baselines were taken by disabling the op and re-calling, with an
assertion that the baseline really routed native — an earlier version of that
script compared AKLR against itself and reported a meaningless "max diff 0".
Three caveats, recorded rather than smoothed over.
The adapter is not yet upstream in AKLR.
The device name has to be overridden before anything loads at all. In the image
this ran in —
rocm/atom-dev, torch 2.10.0+rocm7.2.4 — ROCm reports the card as"AMD Radeon Graphics" rather than as
MI355X, on every run rather thanoccasionally, and AKLR accepts a schema only when every field it declares
matches. Without the override every schema is skipped, every call routes native,
and the interface looks broken while behaving exactly as specified. It is the
first thing anyone reproducing this will hit, so it belongs in the steps and not
in a footnote. The information is not missing —
gcnArchNamereadsgfx950:sramecc+:xnack-on the same card — it is the name that is unreliable.What to match on is the provider's decision; relaxing it has been raised in
AMD-AGI/AKLR#95.
And the interface told us only
provider-declined, while AKLR internally knewwhether the call was out of contract, unmeasured, or on a machine with no
schemas loaded. Letting a provider's own reason through
explain()is raisedin #7240 rather than added here.
Nobody pays for a route they did not turn on
Routing five ops means five ops now reach dispatch on every call — including on
every machine where no provider is enabled, which on the day this merges is all
of them. That path used to walk eligibility and build a frozen
Decisionfor acall no provider could possibly serve: 1.902µs, against the kill switch's
0.137µs. At roughly 120 rmsnorm calls per token it is about 0.23ms of CPU per
decode step in eager mode (a captured graph pays it once, at capture). It is a
pure loss — nobody paying it gets anything back.
An empty enable list and
AITER_PLUGINS=0assert the same thing, so dispatchtreats them as one branch and goes straight to native: 1.902µs → 0.149µs.
The profile is why the branch is placed where it is rather than trimmed:
A frozen dataclass costs more to build than the rest of the path put together,
so there was no trimming that would have closed the gap.
The cost is that these calls record no
Decision:last_decision()anddecision_counts()stay empty while nothing is enabled, the same trade the killswitch already makes.
explain()andstatus()still answer in full, ondemand, and three tests say so. Turning routing off also stops producing a
route-change log line, which is likewise what the kill switch does.
Two things this uncovered were defects rather than consequences:
last_decision()would have returned the stale provider route afterconfigure(enable=())turned routing off. Its docstring already argued whythat is worse than returning nothing — for the kill switch only. The read now
applies one rule to both states.
treated as having no comparable past, so the first provider route after a
framework enables one was recorded as a silent baseline. What it was doing
before is not unknown — it was running native — so
('native', None, None) -> ('provider', …)is now an audit line.tests/test_plugin_overhead.pygains a second machine-independent gate:nothing-enabled must cost within 3x of the kill switch. The 1.9µs path fails it.
The three tests that had used default-deny as a convenient "no provider" fixture
now enable a provider declaring another contract version instead, so the
recording path keeps its coverage rather than losing it to the shortcut.
Also here
last_decision()no longer answers with a record the kill switchinvalidated. With
AITER_PLUGINS=0dispatch records nothing, which is whatmakes that path cost 0.141µs — and the consequence was that the reading went
on returning whatever was recorded before, with nothing saying it was stale.
The check is on the read, not the dispatch path: 0.011µs where it is asked,
rather than 0.056µs on every call that is not. It now covers an empty enable
list on the same grounds — see above.
_reset_for_testing()no longer clears ops routed by importing aiter, sostatus()andexplain()keep reporting production routes after the firsttest.
tests/test_plugin_routed_ops.py, nottests/test_plugin.py, because they import torch and call the real ops. Theinterface's own tests stay buildless so they can gate every PR without a GPU
runner ([CI] Run the provider interface tests as a CPU-only gate on every PR #7466). That exposed an interaction worth naming:
pytest.importorskip("aiter")does not skip whentests/conftest.pyhas puta stub under that name, so tests needing a real build ran against the stub and
failed instead of skipping.
Testing
A built checkout with devices (8x gfx942):
pytest -q tests/— 320 passed, 1skipped. The two graph-capture tests run here rather than being skipped, and
were mutation-checked: breaking either assertion's premise turns them red.
The plugin tests alone are 109, and
black --checkandruff checkare clean.On MI355X the same suite was 329 passed, 5 failed at an earlier revision; all
five failures were
test_flydsl_aot_replay.pyandtest_mega_moe_gfx1250_recipe.pypatchingJitFunction._compile_or_execute,which that container's flydsl 0.2.4 does not have. Neither file is touched by
these commits, and neither introspects signatures, which is the one way
torch_guard.pycould have reached them.Hot-path cost: 2.56µs serving (mean of six runs, 2.51-2.63), 0.149µs with
nothing enabled, 0.14µs with
AITER_PLUGINS=0, against 4.6µs for oneSignature.bind. Serving is above #7466's 2.42µs (six runs, 2.36-2.51) — theranges do not overlap, so it is a real cost added by this PR's commits rather
than run-to-run drift. The 1µs budget stays missed, and stays stated.
The nothing-enabled number is the one that applies to everybody on day one, and
it was 1.902µs until the last commit; see Nobody pays for a route they did not
turn on above.
🤖 Generated with Claude Code
PR Self-Review
Reviewed revision
9af468069aBehavior and intent
Until this PR nothing in AITER is routed: #7465 builds the mechanism and #7466
makes its tests block CI, but the machinery is complete, tested and unused.
This routes five ops, fixes the one thing in AITER that made routing
impossible, and demonstrates an external provider serving through it on real
hardware.
All five stay native by default. Routing changes what happens only once a
framework calls
configure(enable=[...]), which nothing in the tree does.The change with reach beyond the plugin is in
aiter/jit/utils/torch_guard.py:guarded ops now report their own signature through
__wrapped__instead of theclosure's
(*args, **kwargs). That is a prerequisite —route()captures thepublic signature as the op contract, and against
(*args, **kwargs)there isno contract — and it changes what introspection reports for every compiled op
in the tree, which is why it is called out rather than buried.
rmsnorm's mount point also moves, from one backend's HIP binding up to_rms_norm_fwd_dispatchwhere both public spellings converge. That changed thecontract from write-out to functional, so the op version goes to 2, and
deliberately not as a
supersedesof version 1: a provider written against v1handed a v2 call would treat the input tensor as its output buffer.
Validation and unverified scope
A built checkout with devices (8x gfx942):
pytest -q tests/— 320 passed, 1skipped; the plugin tests alone are 109.
black --checkandruff checkclean. Hot-path cost 2.56µs serving (six runs, 2.51–2.63), 0.149µs with nothing
enabled, 0.14µs with
AITER_PLUGINS=0, against 4.6µs for oneSignature.bind.The two graph-capture tests run on a device here rather than skipping, and
both were mutation-checked. On MI355X the suite was 329 passed, 5 failed at an
earlier revision, all five being that container's flydsl 0.2.4 against tests
that patch an attribute it does not have — neither file is touched here, and
neither introspects signatures, the one way
torch_guard.pycould reachthem.
On real hardware, with AKLR (https://github.com/AMD-AGI/AKLR) installed through
packaging metadata and enabled through
configure(): it servedgemm_a8w8_blockscale_bpreshuffleat two shapes with output matching native,declined three shapes before anything ran, and at one shape its kernel failed
inside
run()— where the error propagated rather than falling back, whichis the designed failure boundary.
Unverified: no performance claim is made for any routed op; this is a
correctness and routing pilot. On the MI355X host only one layout variant and
one fp8 dtype could be exercised, because that is all AKLR could load there.
The
torch_guard.pyblast radius is argued from inspection of both wrappersand a tree-wide search for
__wrapped__readers, not from running everycompiled op.
PR-specific question
What permissions and untrusted-input boundary does this CI change have, and
can fork PR code or text reach a privileged execution path?
This PR changes no workflow file and adds no CI permissions; the question is
selected because
.github/appears in the diff range of the series rather thanin this PR's own changes. The boundary it does move is at runtime, not in CI: a
kernel provider is third-party code loaded through an entry point into the
AITER process. That is why discovery is isolated (a broken wheel is recorded
and skipped, never raised into a kernel call), why
select()runs inside atry/except that takes the next provider, and above all why installation grants
nothing — a provider serves only after a framework names it in
configure(),so a wheel arriving as a transitive dependency cannot change which kernels run.
Provider-reported fields are recorded verbatim as provenance and never
interpreted, so nothing a provider says can steer selection.
Changed op tests
None. No file under
op_tests/is changed. The end-to-end tests that call realops live in
tests/test_plugin_routed_ops.py, alongside the rest of the plugintests, so the CPU-only gate in #7466 keeps covering them.