Skip to content

Commit 22b7ddc

Browse files
Andy-Jostyimoj
andauthored
Fix latch test on devices without concurrent managed access (#2413)
Co-authored-by: Yimo Jiang <yimoj@nvidia.com>
1 parent 5ac67b9 commit 22b7ddc

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

cuda_core/tests/test_helpers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import time
66

77
import pytest
8-
from helpers import IS_WINDOWS, IS_WSL
98
from helpers.buffers import PatternGen, compare_equal_buffers, make_scratch_buffer
109
from helpers.latch import LatchKernel
1110
from helpers.logging import TimestampedLogger
@@ -35,9 +34,9 @@ def test_latchkernel():
3534
target.copy_from(ones, stream=stream)
3635
log("going to sleep")
3736
time.sleep(1)
38-
if not IS_WINDOWS and not IS_WSL:
39-
# On any sort of Windows system, checking the memory before stream
40-
# sync results in a page error.
37+
if device.properties.concurrent_managed_access:
38+
# Host access to managed memory while a kernel is active is unsafe on
39+
# devices without concurrent managed access.
4140
log("checking target == 0")
4241
assert compare_equal_buffers(target, zeros)
4342
log("releasing latch and syncing")

0 commit comments

Comments
 (0)