We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0d5f08b + 85d57c2 commit 567ea2cCopy full SHA for 567ea2c
cuda_core/tests/conftest.py
@@ -2,6 +2,7 @@
2
# SPDX-License-Identifier: Apache-2.0
3
4
import multiprocessing
5
+import os
6
7
import helpers
8
import pytest
@@ -29,6 +30,13 @@ def init_cuda():
29
30
# TODO: rename this to e.g. init_context
31
device = Device()
32
device.set_current()
33
+
34
+ # Set option to avoid spin-waiting on synchronization.
35
+ if int(os.environ.get("CUDA_CORE_TEST_BLOCKING_SYNC", 0)) != 0:
36
+ handle_return(
37
+ driver.cuDevicePrimaryCtxSetFlags(device.device_id, driver.CUctx_flags.CU_CTX_SCHED_BLOCKING_SYNC)
38
+ )
39
40
yield
41
_ = _device_unset_current()
42
0 commit comments