@@ -44,25 +44,20 @@ if do_help
44
44
--list List all available tests.
45
45
--thorough Don't allow skipping tests that are not supported.
46
46
--quickfail Fail the entire run as soon as a single test errored.
47
- --jobs=N Launch `N` processes to perform tests (default: Threads.nthreads() ).
47
+ --jobs=N Launch `N` processes to perform tests (default: Sys.CPU_THREADS ).
48
48
--gpus=N Expose `N` GPUs to test processes (default: 1).
49
49
--sanitize[=tool] Run the tests under `compute-sanitizer`.
50
50
--snoop=FILE Snoop on compiled methods and save to `FILE`.
51
51
52
52
Remaining arguments filter the tests that will be executed.""" )
53
53
exit (0 )
54
54
end
55
- set_jobs, jobs = extract_flag! (ARGS , " --jobs" , Threads . nthreads () )
55
+ set_jobs, jobs = extract_flag! (ARGS , " --jobs" , Sys . CPU_THREADS )
56
56
do_sanitize, sanitize_tool = extract_flag! (ARGS , " --sanitize" , " memcheck" )
57
57
do_snoop, snoop_path = extract_flag! (ARGS , " --snoop" )
58
58
do_thorough, _ = extract_flag! (ARGS , " --thorough" )
59
59
do_quickfail, _ = extract_flag! (ARGS , " --quickfail" )
60
60
61
- if ! set_jobs && jobs == 1
62
- @warn """ You are running the CUDA.jl test suite with only a single thread; this will take a long time.
63
- Consider launching Julia with `--threads auto` to run tests in parallel."""
64
- end
65
-
66
61
include (" setup.jl" ) # make sure everything is precompiled
67
62
_, gpus = extract_flag! (ARGS , " --gpus" , ndevices ())
68
63
@@ -180,6 +175,8 @@ picks = reverse(candidates[end-gpus+1:end]) # best GPU first
180
175
ENV [" CUDA_VISIBLE_DEVICES" ] = join (map (pick-> " $(pick. mig ? " MIG" : " GPU" ) -$(pick. uuid) " , picks), " ," )
181
176
@info " Testing using $(length (picks)) device(s): " * join (map (pick-> " $(pick. id) . $(pick. name) (UUID $(pick. uuid) )" , picks), " , " )
182
177
178
+ @info " Running $jobs tests in parallel. If this is too many, specify the `--jobs` argument to the tests, or set the JULIA_CPU_THREADS environment variable."
179
+
183
180
# determine tests to skip
184
181
skip_tests = []
185
182
has_cusolvermg () || push! (skip_tests, " cusolver/multigpu" )
0 commit comments