Repository navigation
Conversation
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/compiler/compilation.jl b/src/compiler/compilation.jl
index 2bfff9c..5c56740 100644
--- a/src/compiler/compilation.jl
+++ b/src/compiler/compilation.jl
@@ -42,8 +42,10 @@ function GPUCompiler.method_tables(job::oneAPICompilerJob)
(method_table, SPIRVIntrinsics.method_table, GPUToolbox.Overlays.int128_overrides)
else
# keep single-precision math that Base computes in Float64 out of double precision
- (method_table, SPIRVIntrinsics.method_table, GPUToolbox.Overlays.float64_overrides,
- GPUToolbox.Overlays.int128_overrides)
+ (
+ method_table, SPIRVIntrinsics.method_table, GPUToolbox.Overlays.float64_overrides,
+ GPUToolbox.Overlays.int128_overrides,
+ )
end
end
diff --git a/test/device/intrinsics.jl b/test/device/intrinsics.jl
index ce37747..eeab908 100644
--- a/test/device/intrinsics.jl
+++ b/test/device/intrinsics.jl
@@ -54,9 +54,9 @@ end
xs = Float32[0, -1, 1.4, 1.5, 1.6, Inf, NaN]
@test Array(map(x -> x < r, oneArray(xs))) == (xs .< r)
- qs = [1//3, -5//7, 3//2, typemax(Int)//2, 2^40//3, -typemax(Int)//(2^40 + 1)]
+ qs = [1 // 3, -5 // 7, 3 // 2, typemax(Int) // 2, 2^40 // 3, -typemax(Int) // (2^40 + 1)]
ns = [0, -1, 2, 2^35, typemax(Int), typemin(Int)]
- fs = Float32[0.3, -0.7, 1.5, 2f0^62, 3.6f11, -Inf]
+ fs = Float32[0.3, -0.7, 1.5, 2.0f0^62, 3.6f11, -Inf]
for op in (<, <=, cmp)
@test Array(op.(oneArray(qs), oneArray(fs))) == op.(qs, fs)
@test Array(op.(oneArray(fs), oneArray(qs))) == op.(fs, qs) |
SPIR-V doesn't support 128-bit integers, which Base uses to compare `Rational`s by multiplying out their denominators. Stack GPUToolbox's `int128_overrides`, which compute these products as pairs of 64-bit words.
Member
Author
|
CI failure is a bug in NEO. Claude has a fix. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #707 +/- ##
==========================================
- Coverage 83.70% 83.05% -0.66%
==========================================
Files 52 51 -1
Lines 4376 4254 -122
==========================================
- Hits 3663 3533 -130
- Misses 713 721 +8 ☔ 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.
Base compares
Rationals with each other, with integers and with floats by multiplying out their denominators withwidemul. With 64-bit rationals (or any float, whosedecomposereturnsInts) that computesInt128products, which SPIR-V doesn't support. This stacks GPUToolbox's newint128_overridestable (JuliaGPU/GPUToolbox.jl#30) regardless of fp64 support, and requires GPUToolbox 3.4. Same fix as JuliaGPU/Metal.jl#550.Tested on an Iris Xe: the new tests fail without the change (13 errors) and pass with it.