Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Commit b0c6f89

Browse files
authored
Merge pull request #616 from JuliaGPU/tb/exclusive_ctx
Use the CUDAnative contexts when inspecting devices during testing.
2 parents ee93174 + 32ab804 commit b0c6f89

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/runtests.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ testf(f, xs...; kwargs...) = TestSuite.compare(f, CuArray, xs...; kwargs...)
1919

2020
# pick a suiteable device (by available memory,
2121
# but also by capability if testing needs to be thorough)
22-
candidates = [(dev=dev,
22+
candidates = [(device!(dev);
23+
(dev=dev,
2324
cap=capability(dev),
24-
mem=CuContext(ctx->CUDAdrv.available_memory(), dev))
25+
mem=CUDAdrv.available_memory()))
2526
for dev in devices()]
2627
thorough = parse(Bool, get(ENV, "CI_THOROUGH", "false"))
2728
if thorough

0 commit comments

Comments
 (0)