Skip to content

Commit 0fb501c

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 NVIDIA#2877 Co-authored-by: Claude Fable 5.1 <[email protected]>
1 parent 4fce1a9 commit 0fb501c

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
@@ -1557,6 +1557,9 @@ def test_vmm_allocator_grow_allocation_slow_path_closes_old_buffer(init_cuda):
15571557
buf = vmm_mr.allocate(2 * 1024 * 1024)
15581558
old_ptr, old_size = int(buf.handle), buf.size
15591559
handle_return(driver.cuMemsetD8(old_ptr, 7, old_size))
1560+
# The memset is asynchronous and the grow unmaps the old range, so let it
1561+
# finish first; on WDDM the batched kernel otherwise faults after the unmap.
1562+
device.sync()
15601563

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

0 commit comments

Comments
 (0)