Skip to content

Commit 30d340b

Browse files
committed
Use CPU for tests
1 parent 35ac112 commit 30d340b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dpctl/tests/test_sycl_queue_manager.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def factory():
185185
assert not dpctl.nested_context_factories
186186

187187

188-
@pytest.mark.skipif(not has_gpu(), reason="No OpenCL GPU queues available")
188+
@pytest.mark.skipif(not has_cpu(), reason="No OpenCL CPU queues available")
189189
def test_device_context_activates_nested_context():
190190
in_context = False
191191
factory_called = False
@@ -206,13 +206,14 @@ def factory(_):
206206
assert not factory_called
207207
assert not in_context
208208

209-
with dpctl.device_context("opencl:gpu:0"):
209+
with dpctl.device_context("opencl:cpu:0"):
210210
assert factory_called
211211
assert in_context
212212

213213
assert not in_context
214214

215215

216+
@pytest.mark.skipif(not has_cpu(), reason="No OpenCL CPU queues available")
216217
@pytest.mark.parametrize(
217218
"factory, exception, match",
218219
[
@@ -225,5 +226,5 @@ def test_nested_context_factory_exception_if_wrong_factory(
225226
):
226227
with pytest.raises(exception, match=match):
227228
with _register_nested_context_factory(factory):
228-
with dpctl.device_context("opencl:gpu:0"):
229+
with dpctl.device_context("opencl:cpu:0"):
229230
pass

0 commit comments

Comments
 (0)