From 20052023a5655fb43d7199ae12d63afbbeb8036a Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Sat, 24 Oct 2026 15:17:46 +0200 Subject: [PATCH] Bound the wrapped-array release test by rounds, not seconds The test waited up to 10 s of wall-clock time for a wrapped host array to be collected, which stalled CI workers on MI250 exceeded twice (#1162, #1185), while the release itself only needs two collections with a device round trip in between: the first finalizes the wrapper, whose finalizer enqueues a host function on the stream; the device reaching it wakes the task that lets go of the array; the second collects the array. Make that round trip explicit by synchronizing the stream each round, and bound the wait by rounds instead, so a slow node can no longer fail it. On MI250X every run completes in exactly two rounds, idle or with all cores busy. Co-Authored-By: Claude Fable 5.1 --- test/core/rocarray_base.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/core/rocarray_base.jl b/test/core/rocarray_base.jl index edb844434..aee1fb66a 100644 --- a/test/core/rocarray_base.jl +++ b/test/core/rocarray_base.jl @@ -313,9 +313,11 @@ end end collected = Threads.Atomic{Bool}(false) wrap_tracked(collected) - t = time() - while !collected[] && time() - t < 10 + # a few GC rounds with a device round trip in between; bound by rounds, not time + for _ in 1:100 + collected[] && break GC.gc(true) + AMDGPU.synchronize() sleep(0.01) end @test collected[]