Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cuda_core/tests/test_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,7 @@ def test_vmm_host_modify_allocation_rejects_exportable_handle_type(init_cuda):


@pytest.mark.agent_authored(model="claude-fable-5-1")
@pytest.mark.thread_unsafe(reason="records process-global warnings")
def test_vmm_allocate_zero_size(init_cuda):
"""allocate(0) returns an empty buffer without a driver call; a grow of it inherits its stream."""
device = _vmm_device_or_skip()
Expand All @@ -1780,10 +1781,12 @@ def test_vmm_allocate_zero_size(init_cuda):
# The grown buffer's deallocation is ordered on the stream passed to
# allocate(0): its close waits for the work queued there. The sleep
# kernel does not touch the buffer, so a missing wait fails the event
# check instead of faulting.
# check instead of faulting. The close is wrapped so a skipped sync
# surfaces as a CUDAWarning instead of a bare event-check failure.
NanosleepKernel(device, sleep_duration_ms=200).launch(s)
done = s.record()
grown.close()
with assert_no_cuda_warning():
grown.close()
assert done.is_done
buf.close()
finally:
Expand Down
Loading