@@ -18,9 +18,9 @@ function apply_seed(seed)
1818 end
1919end
2020
21- @testset " rand( $T ), seed $seed " for T in (
22- Int32, UInt32, Int64, UInt64, Float32, Float64,
23- ) , seed in (nothing , #= missing,=# 1234 )
21+ eltypes = [filter(x -> ! (x <: Complex ), GPUArraysTestSuite . supported_eltypes(CLArray)); UInt16; UInt32; UInt64]
22+
23+ @testset " rand( $T ), seed $seed " for T in eltypes , seed in (nothing , #= missing,=# 1234 )
2424 # different kernel invocations should get different numbers
2525 @testset " across launches" begin
2626 function kernel(A:: AbstractArray{T} , seed) where {T}
8282 # NOTE: we don't just generate two numbers and compare them, instead generating a
8383 # couple more and checking they're not all the same, in order to avoid
8484 # occasional collisions with lower-precision types (i.e., Float16).
85- # TODO : why is the third dimension broken?
86- @test length(unique(Array(a))) > 1 broken = active_dim == 3 || active_dim == 6
85+ @test length(unique(Array(a))) > 1
8786 end
8887end
8988
90- @testset " basic randn($T ), seed $seed " for T in (
91- Float32, Float64,
92- ), seed in (nothing , #= missing,=# 1234 )
89+ @testset " basic randn($T ), seed $seed " for T in filter(x -> x <: Base.IEEEFloat , eltypes), seed in (nothing , #= missing,=# 1234 )
9390 function kernel(A:: AbstractArray{T} , seed) where {T}
9491 apply_seed(seed)
9592 tid = get_global_id(1 )
110107 end
111108end
112109
113- @testset " basic randexp($T ), seed $seed " for T in (
114- Float32, Float64,
115- ), seed in (nothing , #= missing,=# 1234 )
110+ @testset " basic randexp($T ), seed $seed " for T in filter(x -> x <: Base.IEEEFloat , eltypes), seed in (nothing , #= missing,=# 1234 )
116111 function kernel(A:: AbstractArray{T} , seed) where {T}
117112 apply_seed(seed)
118113 tid = get_global_id(1 )
0 commit comments