Skip to content

Commit c95d194

Browse files
Implemented PR comment
1 parent a0244c3 commit c95d194

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dpctl/tests/test_sycl_kernel_submit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
import dpctl.memory as dpctl_mem
2727
import dpctl.program as dpctl_prog
2828

29-
from ._helper import has_gpu
3029

31-
32-
@pytest.mark.skipif(not has_gpu(), reason="No OpenCL GPU queues available")
3330
def test_create_program_from_source():
31+
try:
32+
q = dpctl.SyclQueue("opencl", property="enable_profiling")
33+
except dpctl.SyclQueueCreationError:
34+
pytest.skip("OpenCL queue could not be created")
3435
oclSrc = " \
3536
kernel void axpy(global int* a, global int* b, global int* c, int d) { \
3637
size_t index = get_global_id(0); \
3738
c[index] = d*a[index] + b[index]; \
3839
}"
39-
q = dpctl.SyclQueue("opencl:gpu", property="enable_profiling")
4040
prog = dpctl_prog.create_program_from_source(q, oclSrc)
4141
axpyKernel = prog.get_sycl_kernel("axpy")
4242

0 commit comments

Comments
 (0)