Skip to content

Commit 150af15

Browse files
committed
Try using unified memory.
1 parent c23e09f commit 150af15

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/base/random.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,8 @@ end
200200

201201
@testset "counter overflow" begin
202202
rng = CUDA.RNG()
203-
# we may not be able to allocate over 4GB on the GPU, so use CPU memory
204-
#c = CUDA.zeros(Float16, (64, 32, 512, 32, 64))
205-
c = Array{Float16}(undef, 64, 32, 512, 32, 64)
206-
GC.@preserve c begin
207-
dc = unsafe_wrap(CuArray, c)
208-
rand!(rng, dc)
209-
randn!(rng, dc)
210-
end
203+
# we may not be able to allocate over 4GB on the GPU, so use unified memory
204+
c = CuArray{Float16, 5, CUDA.UnifiedMemory}(undef, 64, 32, 512, 32, 64)
205+
rand!(rng, c)
206+
randn!(rng, c)
211207
end

0 commit comments

Comments
 (0)