This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
[BUGFIX] Fix intgemm flaky test in #19197 for master #19202
Merged
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.
Description
This is a twin of #19201 to fix #19197. I made a flaky test, sorry.
It's testing a quantizer that entails rounding but rounding 0.5 is ambiguous. So I intended to ban 0.5 by adding a small value. The code checks the interval (0.45, 0.55) and adds 0.05 to anything there. But that just shifts it to (0.5, 0.6) when I meant to go further from 0.5. Now it shifts to (0.65, 0.75) so 0.5 won't appear.
Checklist
Essentials
Changes
Fix flaky test
test_contrib_intgemm_prepare_data
Comments
Another approach would be to allow some tolerance for quantized values around 0.5.