Repository navigation
Add regression tests for Int128 and BFloat16 kernels - #794
Merged
Merged
Conversation
An Int128 kernel crashed the Khronos SPIR-V translator used on the LTS stack, which GPUCompiler now rejects during IR validation. IGC rounded the results of BFloat16 additions, subtractions and multiplications towards zero, and applied `abs` to the bits of a BFloat16 value it converted to Float32; both are fixed by IGC backports in libigc_jll.
GPUCompiler 2.26 rejects 128-bit integers during SPIR-V IR validation, which the new Int128 regression test relies on.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #794 +/- ##
==========================================
- Coverage 87.66% 86.90% -0.77%
==========================================
Files 56 55 -1
Lines 5715 5093 -622
==========================================
- Hits 5010 4426 -584
+ Misses 705 667 -38 ☔ 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.
Fixes #783.
The fixes themselves are upstream; this PR adds regression tests and the compat bump.
LLVM ERROR. GPUCompiler 2.26 (SPIR-V: reject 128-bit integers during IR validation GPUCompiler.jl#1144) now rejects these types during IR validation, giving anInvalidIRError.+,-and*with a bf16 destination, which rounds toward zero. It also appliedabsand negation, folded into a BFloat16→Float32 conversion, to the raw bits. Both bugs are fixed in IGC v2.43.9; libigc_jll 2.41.5+7 backports the fixes ([libigc] Backport IGC fixes for bfloat16 rounding and source modifiers JuliaPackaging/Yggdrasil#15905). Build numbers can't be expressed in compat, so up-to-date environments pick it up automatically.The new tests check that an Int128 kernel throws
InvalidIRError, and that device BFloat16+ - * /,-Float32(x)andabs(Float32(x))match the host bit for bit. Locally on an Arc A770, the full suite passes with the registered packages.