Files
metal2vulkan/crates/metal2vulkan-runtime/src/memory
Anees Iqbal 03ce33040c Tests: blocks_ahead's hurried call excludes its making's own time; hand_out_waits names its timing assumption
Two timing tests failed on the RTX 5080 Laptop GPU inside the runtime suite (NVIDIA 615.71.09,
round job m3-max-16620 at 600b535875). In both, the test's bound was wrong, not the runtime.

blocks_ahead::a_creation_that_needs_a_block_whose_making_waits_for_quiet_waits_for_its_allocation_alone
failed with "a creation call waited 53.389074ms, out to the making's wait for quiet". The call
the test holds to QUIET_MOST is the one that cut a making's wait for quiet short. That call then
waits for the making itself: a 64 MiB block's allocation, which the driver takes as long as it
takes. The bound counted that allocation as if it were a wait for quiet. The ready thread now
times each making once its wait for a burst's end is over (ready::Made::making). AheadBlocks sums
the times of the makings a call waited for (waited_making). Both are test-only fields. The test
holds the hurrying call's time less its making's own to half of QUIET_MOST, and every other call
to QUIET_MOST. The test's doc states the assumption: the host runs the test's thread within
QUIET_MOST.

hand_out_waits::a_hand_out_makes_its_own_first_work_without_waiting_for_another_queue_s_work
failed at 80 s. The test times its fills alone and predicts the busy work's length from them.
Beside the dma-buf leak probe's GPU work, a fill timed 1.59 ms, and the busy work of 378 fills
was done within 270 ms of the 601 ms they predicted. Each hand-out's staging submission waited
133 ms for the GPU, so the hand-outs returned after the busy work. The module docs now state the
assumption: the GPU runs the test's work alone. Where a hand-out finds the busy work done before
half the predicted time, the test says that assumption failed rather than that the hand-out
waited. The check rounds already run it alone (the GPU-time list).

Verified: both pass on the RTX 2080 (potluck m3-max-16811; blocks_ahead again in m3-max-16901,
where the hurrying call took 1.47 ms, 1.25 ms of it its making's own, 0.22 ms beside) and on the
RTX 3090 (m3-max-16941: 1.41 ms, 1.23 ms, 0.18 ms), NVIDIA 620.70.06.
2026-11-11 12:48:57 -08:00
..