Repository navigation
Test Int16 reductions whose map overflows - #674
Merged
Merged
Conversation
IGC before libigc_jll 2.34.4+2 left 16-bit mad results in the accumulator at full width, so a signed max compared the unwrapped value and returned wrong results on TGL and DG2. Fixes #670.
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/test/array.jl b/test/array.jl
index f671a75..ca26cc6 100644
--- a/test/array.jl
+++ b/test/array.jl
@@ -197,9 +197,11 @@ end
@testset "narrow integer reduction with overflowing map" begin
# IGC < 2.34.4+2 kept the result of a 16-bit `mad` in the accumulator at full width, so
# the signed `max` compared the unwrapped value (JuliaGPU/oneAPI.jl#670, TGL and DG2).
- A = Complex{Int16}[22264-2672im -3184-13367im 20267+16808im -29600+21497im;
- -2+6036im -13334-32552im -4391+23096im 1804+13481im;
- -19764+32524im 20734-5522im 30645+17973im 21749-26470im]
+ A = Complex{Int16}[
+ 22264 - 2672im -3184 - 13367im 20267 + 16808im -29600 + 21497im;
+ -2 + 6036im -13334 - 32552im -4391 + 23096im 1804 + 13481im;
+ -19764 + 32524im 20734 - 5522im 30645 + 17973im 21749 - 26470im
+ ]
mk = A -> view(permutedims(A), [1, 2, 3, 4], :)
R = Base.mapreducedim!(abs2, max, zeros(Int16, 1, 3), mk(A))
dR = Base.mapreducedim!(abs2, max, oneArray(zeros(Int16, 1, 3)), mk(oneArray(A))) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #674 +/- ##
==========================================
- Coverage 81.12% 80.76% -0.37%
==========================================
Files 57 56 -1
Lines 4121 4101 -20
==========================================
- Hits 3343 3312 -31
- Misses 778 789 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Adds a regression test for #670. IGC before libigc_jll 2.34.4+2 left the result of a 16-bit
madin the accumulator at full width, so the signedselimplementingmaxcompared the unwrapped value. This produced wrong results on TGL and DG2.The fix is in IGC (intel/intel-graphics-compiler#449), backported in JuliaPackaging/Yggdrasil#15030 and registered as libigc_jll 2.34.4+2 (JuliaRegistries/General#170943). NEO_jll already pins libigc_jll 2.34.4, and compat can't name a build number, so this needs no compat change.
On Iris Xe, the test fails with 2.34.4+1 and passes with 2.34.4+2. The full test suite passes locally with +2.
Fixes #670.