Skip to content

Commit 58c55c7

Browse files
committed
Increase the memory budget for enzyme workers
1 parent 9193978 commit 58c55c7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎test/runtests.jl‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ args = parse_args(ARGS; custom = ["fast"])
4141
# --fast: skip AD tests and inject fast_tests=true into each worker sandbox
4242
fast = !isnothing(args.custom["fast"])
4343

44-
# Enzyme workers end up needing ~4 GB, but the default job count assumes ~2 GB per worker.
45-
# Cap the number of jobs by increasing the per-worker memory budget unless --jobs was given.
44+
# Enzyme workers peak at ~4.5 GB, but the default job count
45+
# assumes ~2 GB per worker. Cap the number of jobs by increasing the per-worker memory budget
46+
# unless --jobs was given; with 4 GB, 16 GB CI runners would run out of memory and be killed.
4647
selected = copy(testsuite)
4748
ParallelTestRunner.filter_tests!(selected, args)
4849
has_enzyme = any(startswith("enzyme"), keys(selected))
4950
if isnothing(args.jobs) && has_enzyme
50-
njobs = clamp(Int(Sys.free_memory() ÷ (4 * Int64(2)^30)), 1, Sys.CPU_THREADS)
51+
njobs = clamp(Int(Sys.free_memory() ÷ (5 * Int64(2)^30)), 1, Sys.CPU_THREADS)
5152
# On Windows with Julia 1.10, memory pressure makes recycled workers too slow to start:
5253
# Malt gives up if a new worker does not connect within 30 s, which aborts the whole run.
5354
Sys.iswindows() && VERSION < v"1.11" && (njobs = min(njobs, 2))

0 commit comments

Comments
 (0)