Skip to content

Commit 9e7578d

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 c74fe05 commit 9e7578d

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
@@ -1524,6 +1524,9 @@ def test_vmm_allocator_grow_allocation_slow_path_closes_old_buffer(init_cuda):
15241524
buf = vmm_mr.allocate(2 * 1024 * 1024)
15251525
old_ptr, old_size = int(buf.handle), buf.size
15261526
handle_return(driver.cuMemsetD8(old_ptr, 7, old_size))
1527+
# The memset is asynchronous and the grow unmaps the old range, so let it
1528+
# finish first; on WDDM the batched kernel otherwise faults after the unmap.
1529+
device.sync()
15271530

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

0 commit comments

Comments
 (0)