Skip to content

Commit bd6b7d1

Browse files
Andy-Jostclaude
andcommitted
test(cuda.core): wait for the memset before growing the VMM buffer
The slow-path regression test fills the buffer with cuMemsetD8 and grows it at once. Memset is asynchronous with respect to the host, and on WDDM the batched kernel can still be pending when the grow unmaps the old range, so it faults with a sticky CUDA_ERROR_ILLEGAL_ADDRESS that took every later test in the job down with it. Synchronize before the grow. Issue #2877 Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 35ae30c commit bd6b7d1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cuda_core/tests/test_memory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,9 @@ def test_vmm_allocator_grow_allocation_slow_path_closes_old_buffer(init_cuda):
15561556
buf = vmm_mr.allocate(2 * 1024 * 1024)
15571557
old_ptr, old_size = int(buf.handle), buf.size
15581558
handle_return(driver.cuMemsetD8(old_ptr, 7, old_size))
1559+
# The memset is asynchronous and the grow unmaps the old range, so let it
1560+
# finish first; on WDDM the batched kernel otherwise faults after the unmap.
1561+
device.sync()
15591562

15601563
# Occupy the address range right after buf so the adjacent reservation cannot
15611564
# be honored and modify_allocation has to take the slow path.

0 commit comments

Comments
 (0)