From 6a2772f2e209fa35cc621111f21438b38ea45185 Mon Sep 17 00:00:00 2001 From: Yimo Jiang Date: Tue, 21 Jul 2026 03:09:03 +0000 Subject: [PATCH] Fix latch test on devices without concurrent managed access --- cuda_core/tests/test_helpers.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cuda_core/tests/test_helpers.py b/cuda_core/tests/test_helpers.py index 9cf93fbd21d..43dbf8887e2 100644 --- a/cuda_core/tests/test_helpers.py +++ b/cuda_core/tests/test_helpers.py @@ -5,7 +5,6 @@ import time import pytest -from helpers import IS_WINDOWS, IS_WSL from helpers.buffers import PatternGen, compare_equal_buffers, make_scratch_buffer from helpers.latch import LatchKernel from helpers.logging import TimestampedLogger @@ -35,9 +34,9 @@ def test_latchkernel(): target.copy_from(ones, stream=stream) log("going to sleep") time.sleep(1) - if not IS_WINDOWS and not IS_WSL: - # On any sort of Windows system, checking the memory before stream - # sync results in a page error. + if device.properties.concurrent_managed_access: + # Host access to managed memory while a kernel is active is unsafe on + # devices without concurrent managed access. log("checking target == 0") assert compare_equal_buffers(target, zeros) log("releasing latch and syncing")