Repository navigation
fix(ep-cpu): update the four head_sink call sites #1956 did not (main does not compile) - #1963
justinchuby wants to merge 1 commit into
Conversation
…missed `cargo clippy --locked --all-targets -p onnx-runtime-ep-cpu -- -D warnings` fails with two E0061s on a pristine `ae7c6536a`. That command is `ci.yml:377`, a step of the **required** `Rust quality` check, and it runs before the engine step #1961 widened. #1956 added `head_sink` to `sdpa_decode_row` and `sdpa_decode_group` and updated the callers inside `group_query_attention.rs`. #1961 then repaired the engine's two call sites. The two in ep-cpu's own `gqa_decode` bench were missed by both, and a bench is compiled only under `--all-targets`, so no ordinary build or test run reaches it. Both sites pass `None`, which #1956's doc comment states "reproduces the pre-sink numerics bit-for-bit". This bench compares two *schedules* against each other, so both arms have to keep computing what they computed when the comparison was calibrated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
78a72f2 to
91670c5
Compare
|
Closing: superseded, and the tree is genuinely repaired. #1961 fixed the engine's two call sites and #1958 fixed the bench's two, which is the complete set this PR carried. Both landed while I was validating. Verified rather than assumed, on a pristine Worth recording, because three separate PRs chased one signature change and the sequence is the interesting part:
So That is the shape I keep filing on #1817: a guard that was never executed in the failing direction. Here it is one step further along — the guard was executing and was failing, and three PRs were merged past it while the queue meant nobody read the colour. Widening a check that was already going to be red does not make it redder. The concrete cost was ~40 minutes of my own work fixing something already fixed. The one thing that would have prevented it for all three of us is checking the first failing step of the required job rather than the one nearest the symptom. The unrelated second red I mentioned above — |
maindoes not compileOn a pristine checkout of
1b99d2232with a cleangit status:Both that command and
cargo clippy --locked --all-targets -p onnx-runtime-ep-cpu -- -D warningsare steps of the requiredRust qualitycheck (ci.yml:377andci.yml:469). So this is red on every open PR in the repo, not only for whoever happens to build the engine.Cause
#1956 (
215559597, implement GroupQueryAttention head_sink on CPU) added ahead_sinkparameter to three public functions inonnx-runtime-ep-cpu::kernels::sdpa:sdpa_decode_rowhead_sink: Option<f32>sdpa_decode_row_accessorhead_sink: Option<f32>sdpa_decode_grouphead_sink: Option<&[f32]>It touched exactly two files, both inside
onnx-runtime-ep-cpu, and updated the callers ingroup_query_attention.rs. Four callers in two other targets were missed:onnx-genai-engine/src/native_decode/paged_gqa.rssdpa_decode_row_accessoronnx-genai-engine/src/native_decode/paged_gqa.rssdpa_decode_rowonnx-runtime-ep-cpu/benches/gqa_decode.rssdpa_decode_rowonnx-runtime-ep-cpu/benches/gqa_decode.rssdpa_decode_groupThe bench pair is the interesting half: a bench is compiled only under
--all-targets, so it is invisible to every ordinarycargo build/cargo testand shows up only in the clippy gate.The fix, and why it is not a behaviour change
Every site passes
None. That is not a placeholder — it is what #1956's own doc comment specifies:Neither call site binds a sink input.
paged_gqa.rsexists to be the paged/reference decode the fused kernels are checked against, andgqa_decode.rscompares two schedules — both must keep computing exactly what they computed before #1956 or they stop being the thing they are for.Evidence
Both required commands, on this branch, from clean:
Attribution is from a build, not from
git log:215559597^compiles,215559597does not.Scope
git grep sdpa_decode_rowconfirms there are no other callers in the workspace — the four above and the in-crate ones #1956 already updated are the complete set.Deliberately nothing else in this PR. There is a second, unrelated red on
mainthat I hit while tracking this one down (a test added by #1900 that #1892 later broke); it needs a real fix rather than a call-site update and it is not going to share a PR with a build unbreak.