Skip to content

Commit 39c3f4b

Browse files
committed
test: see which testset fails
1 parent 8daec65 commit 39c3f4b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/host/random.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ function Random.randn!(rng::RNG, A::AnyGPUArray{T}) where T <: Number
9696
threads = (length(A) - 1) ÷ 2 + 1
9797
@kernel function randn!(a, randstates)
9898
i = @index(Global, Linear)
99+
threadidx = @index(Local, Linear)
99100
idx = 2*(i - 1) + 1
100-
threadidx = (i - 1) % length(randstates) + 1
101101
U1 = gpu_rand(T, threadidx, randstates)
102102
U2 = gpu_rand(T, threadidx, randstates)
103103
Z0 = sqrt(T(-2.0)*log(U1))*cos(T(2pi)*U2)

test/testsuite/random.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
cpu_rng = Random.default_rng()
88

99
@testset "rand" begin # uniform
10-
for T in eltypes, d in (10, (10, 10), (128, 128))
10+
for T in eltypes, d in (10, (10,10))
1111
A = AT{T}(undef, d)
1212
B = copy(A)
1313
rand!(rng, A)
@@ -44,7 +44,7 @@
4444
@testset "randn" begin # normally-distributed
4545
# XXX: randn calls sqrt, and Base's sqrt(::Complex) performs
4646
# checked type conversions that throw boxed numbers.
47-
for T in filter(isrealfloattype, eltypes), d in (2, (2,2))
47+
for T in filter(isrealfloattype, eltypes), d in (2, (2, 2), (128, 128))
4848
A = AT{T}(undef, d)
4949
B = copy(A)
5050
randn!(rng, A)

0 commit comments

Comments
 (0)