Skip to content

Commit 86f3c00

Browse files
Andy-Jostclaude
andcommitted
test(cuda.core): cap the memory_ipc modules at two threads instead of one
Review follow-up: keep threaded coverage of the IPC export and import paths by capping the nine memory_ipc modules at two threads instead of one. test_strided_layout.py and test_register_events stay single-threaded: the first has no CUDA call and the second waits on fixed timeouts. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 60ef3d0 commit 86f3c00

9 files changed

Lines changed: 18 additions & 18 deletions

‎cuda_core/tests/memory_ipc/test_errors.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828

2929
# these tests spawn new processes and files which fails for very many threads;
30-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
31-
pytestmark = pytest.mark.parallel_threads_limit(1)
30+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
31+
pytestmark = pytest.mark.parallel_threads_limit(2)
3232

3333

3434
def test_outer_timeout_marker_is_applied(request):

‎cuda_core/tests/memory_ipc/test_event_ipc.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818

1919
# these tests spawn new processes and files which fails for very many threads;
20-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
21-
pytestmark = pytest.mark.parallel_threads_limit(1)
20+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
21+
pytestmark = pytest.mark.parallel_threads_limit(2)
2222

2323

2424
@pytest.mark.skipif(Device().compute_capability.major < 7, reason="__nanosleep is only available starting Volta (sm70)")

‎cuda_core/tests/memory_ipc/test_ipc_concurrent_import.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
THREADS = 4
3030

3131
# these tests spawn new processes and files which fails for very many threads;
32-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
33-
pytestmark = pytest.mark.parallel_threads_limit(1)
32+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
33+
pytestmark = pytest.mark.parallel_threads_limit(2)
3434

3535

3636
def child_main(queue):

‎cuda_core/tests/memory_ipc/test_ipc_duplicate_import.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
ENABLE_LOGGING = False # Set True for test debugging and development
2525

2626
# these tests spawn new processes and files which fails for very many threads;
27-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
28-
pytestmark = pytest.mark.parallel_threads_limit(1)
27+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
28+
pytestmark = pytest.mark.parallel_threads_limit(2)
2929

3030

3131
def child_main(log, queue):

‎cuda_core/tests/memory_ipc/test_memory_ipc.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
NTASKS = 2
1616

1717
# these tests spawn new processes and files which fails for very many threads;
18-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
19-
pytestmark = pytest.mark.parallel_threads_limit(1)
18+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
19+
pytestmark = pytest.mark.parallel_threads_limit(2)
2020

2121

2222
class TestIpcMempool:

‎cuda_core/tests/memory_ipc/test_peer_access.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
NBYTES = 64
1616

1717
# these tests spawn new processes and files which fails for very many threads;
18-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
19-
pytestmark = pytest.mark.parallel_threads_limit(1)
18+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
19+
pytestmark = pytest.mark.parallel_threads_limit(2)
2020

2121

2222
class TestPeerAccessNotPreservedOnImport:

‎cuda_core/tests/memory_ipc/test_send_buffers.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
NTASKS = 7
1818

1919
# these tests spawn new processes and files which fails for very many threads;
20-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
21-
pytestmark = pytest.mark.parallel_threads_limit(1)
20+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
21+
pytestmark = pytest.mark.parallel_threads_limit(2)
2222

2323

2424
class TestIpcSendBuffers:

‎cuda_core/tests/memory_ipc/test_serialize.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
NBYTES = 64
1616

1717
# these tests spawn new processes and files which fails for very many threads;
18-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
19-
pytestmark = pytest.mark.parallel_threads_limit(1)
18+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
19+
pytestmark = pytest.mark.parallel_threads_limit(2)
2020

2121

2222
class TestObjectSerializationDirect:

‎cuda_core/tests/memory_ipc/test_workerpool.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
NTASKS = 20
1818

1919
# these tests spawn new processes and files which fails for very many threads;
20-
# child processes and IPC fixtures are shared across workers (#2784); run single-threaded
21-
pytestmark = pytest.mark.parallel_threads_limit(1)
20+
# child processes and IPC fixtures are shared across workers (#2784); cap at two threads
21+
pytestmark = pytest.mark.parallel_threads_limit(2)
2222

2323

2424
class TestIpcWorkerPool:

0 commit comments

Comments
 (0)