Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,15 @@ try
end
end
@sync begin
function recycle_worker(p)
function recycle_worker(p, timeout=0)
if isdefined(CUDA, :to)
to = remotecall_fetch(p) do
CUDA.to
end
push!(timings, to)
end

rmprocs(p, waitfor=30)
rmprocs(p, waitfor=timeout)

return nothing
end
Expand Down Expand Up @@ -398,10 +398,10 @@ try
# resetting the context breaks certain CUDA libraries,
# so spawn a new worker when the test did so
if test in ["core/initialization", "core/cudadrv"]
p = recycle_worker(p)
p = recycle_worker(p, 30)
end
end

# is this actually needed at the end of the run?
if p !== nothing
recycle_worker(p)
end
Expand Down