Skip to content

Commit d9d8553

Browse files
committed
These tests seem to test process global cleanup (not sure I follow)
1 parent 5fd3268 commit d9d8553

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

cuda_core/tests/graph/test_graph_definition_lifetime.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ def test_event_survives_graph_clone_and_execution(init_cuda):
592592
# =============================================================================
593593

594594

595+
@pytest.mark.thread_unsafe(reason="coalescing and drain thread are process-global properties")
595596
@pytest.mark.agent_authored(model="gpt-5.6")
596597
def test_user_object_cleanup_is_coalesced_on_python_thread(init_cuda):
597598
"""More than 32 CUDA callbacks drain through one main-thread pending call."""
@@ -610,6 +611,7 @@ def test_user_object_cleanup_is_coalesced_on_python_thread(init_cuda):
610611
assert set(finalized_threads) == {main_thread}
611612

612613

614+
@pytest.mark.thread_unsafe(reason="scenario needs a whole interpreter, so one subprocess per run suffices")
613615
@pytest.mark.agent_authored(model="gpt-5.6")
614616
def test_pending_call_queue_saturation_preserves_cleanup(tmp_path):
615617
"""A full CPython queue neither strands nor mis-threads cleanup."""
@@ -1319,6 +1321,7 @@ def test_memcpy_buffer_survives_close(init_cuda):
13191321
assert list(out) == [0xCD] * 4
13201322

13211323

1324+
@pytest.mark.thread_unsafe(reason="release is drained by the process-global cleanup queue, not by this thread")
13221325
@pytest.mark.agent_authored(model="claude-opus-4.8")
13231326
def test_memcpy_buffer_allocations_released_after_graph_destroyed(init_cuda):
13241327
"""Destroying the graph frees both memcpy operand allocations.

cuda_core/tests/graph/test_graph_update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def new_callback():
196196
assert called == ["new"]
197197

198198

199+
@pytest.mark.thread_unsafe(reason="release is drained by the process-global cleanup queue, not by this thread")
199200
@pytest.mark.agent_authored(model="gpt-5.6")
200201
def test_failed_graph_update_does_not_adopt_attachments(init_cuda):
201202
"""A rejected source graph keeps ownership separate from the exec."""

0 commit comments

Comments
 (0)