From 4dcea89cf442a0dc01e30e223f1b3d2f067ca62b Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Fri, 17 Apr 2026 08:43:51 -0400 Subject: [PATCH] nvbug5939707: Don't run tests requiring __nanosleep on < sm70 --- cuda_core/tests/memory_ipc/test_event_ipc.py | 1 + cuda_core/tests/test_event.py | 4 +++- cuda_core/tests/test_helpers.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cuda_core/tests/memory_ipc/test_event_ipc.py b/cuda_core/tests/memory_ipc/test_event_ipc.py index 793ae0744c3..61fa7ca8536 100644 --- a/cuda_core/tests/memory_ipc/test_event_ipc.py +++ b/cuda_core/tests/memory_ipc/test_event_ipc.py @@ -15,6 +15,7 @@ NBYTES = 64 +@pytest.mark.skipif(Device().compute_capability.major < 7, reason="__nanosleep is only available starting Volta (sm70)") class TestEventIpc: """Check the basic usage of IPC-enabled events with a latch kernel.""" diff --git a/cuda_core/tests/test_event.py b/cuda_core/tests/test_event.py index ddceacd77c7..1f62a131261 100644 --- a/cuda_core/tests/test_event.py +++ b/cuda_core/tests/test_event.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 @@ -21,6 +21,7 @@ def test_event_init_disabled(): cuda.core._event.Event() # Ensure back door is locked. +@pytest.mark.skipif(Device().compute_capability.major < 7, reason="__nanosleep is only available starting Volta (sm70)") def test_timing_success(init_cuda): options = EventOptions(enable_timing=True) device = Device() @@ -117,6 +118,7 @@ def test_error_timing_recorded(): event3 - event2 +@pytest.mark.skipif(Device().compute_capability.major < 7, reason="__nanosleep is only available starting Volta (sm70)") def test_error_timing_incomplete(): device = Device() device.set_current() diff --git a/cuda_core/tests/test_helpers.py b/cuda_core/tests/test_helpers.py index 23a5b71c854..9cf93fbd21d 100644 --- a/cuda_core/tests/test_helpers.py +++ b/cuda_core/tests/test_helpers.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 @@ -17,6 +17,7 @@ NBYTES = 64 +@pytest.mark.skipif(Device().compute_capability.major < 7, reason="__nanosleep is only available starting Volta (sm70)") def test_latchkernel(): """Test LatchKernel.""" log = TimestampedLogger(enabled=ENABLE_LOGGING)