-
Notifications
You must be signed in to change notification settings - Fork 46
fix rand(::AbstractRange{Int64})
#402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Previously, the default method would widen to `Int128` causing compilation failures
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/device/random.jl b/src/device/random.jl
index aa2cf7d..04a1c0e 100644
--- a/src/device/random.jl
+++ b/src/device/random.jl
@@ -233,5 +233,7 @@ end
@invoke Random.randexp(rng::AbstractRNG, T::Type{<:AbstractFloat})
end
-@device_override Random.Sampler(::Type{<:AbstractRNG}, r::AbstractUnitRange{T},
- ::Random.Repetition) where {T<:Union{Int64, UInt64}} = Random.SamplerRangeFast(r)
+@device_override Random.Sampler(
+ ::Type{<:AbstractRNG}, r::AbstractUnitRange{T},
+ ::Random.Repetition
+) where {T <: Union{Int64, UInt64}} = Random.SamplerRangeFast(r)
diff --git a/test/device/random.jl b/test/device/random.jl
index 6fef392..93e2032 100644
--- a/test/device/random.jl
+++ b/test/device/random.jl
@@ -147,8 +147,8 @@ end
a = OpenCL.zeros(T, n)
b = OpenCL.zeros(T, n)
- @opencl global_size=n local_size=n kernel(a, seed)
- @opencl global_size=n local_size=n kernel(b, seed)
+ @opencl global_size = n local_size = n kernel(a, seed)
+ @opencl global_size = n local_size = n kernel(b, seed)
if seed === nothing || seed === missing
@test Array(a) != Array(b) |
Previously, the default method would widen to `Int128` causing compilation failures ref JuliaGPU/OpenCL.jl#402
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #402 +/- ##
=======================================
Coverage 80.19% 80.19%
=======================================
Files 12 12
Lines 722 722
=======================================
Hits 579 579
Misses 143 143 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Previously, the default method would widen to `Int128` causing compilation failures ref JuliaGPU/OpenCL.jl#402
Previously, the default method would widen to `Int128` causing compilation failures ref JuliaGPU/OpenCL.jl#402
Previously, the default method would widen to `Int128` causing compilation failures ref JuliaGPU/OpenCL.jl#402
Previously, the default method would widen to
Int128causingcompilation failures