Repository navigation
test(awq): match the capture-perf nodes to #5327's drop-set merge - #5349
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tests/test_awq_capture_perf_5284.pyhas three red nodes onmain@5470d9d4. They are test-side over-specifications left behind by #5327's drop-set merge, not product defects; this PR makesmaingreen again with a test-only change.Why they are red
#5327 replaced the
cap + countconcat/topk merge with a drop-set search that callstorch.topktwice (largest kept rows, then the drop set) and fills the freed slots in a different order.mainbecausetest_a_winning_capture_still_mergesassert len(calls) == 1; the merge now issues 2test_tied_priorities_take_the_merge_pathassert len(calls) == 1; the merge now issues 2test_merge_matches_the_previous_algorithm[2]AWQProcessor._merge_reservoir_rowsdocuments that the buffer is "deliberately not kept in capture order", so the layout comparison was never a contract.Change
assert len(calls) == 1->assert callsin the two merge-path nodes._canonical_snapshotsorts the kept rows by(source, row)before the equivalence comparison intest_merge_matches_the_previous_algorithm. The kept buffer rows, priorities, sources, row indices andusedare still compared exactly. I checked the snapshot is not vacuous: perturbing one kept priority makes the comparison fail.No product code changes.
Verification
main(5470d9d4).bash format/check.shpasses.