diff --git a/dpctl/tests/test_sycl_context.py b/dpctl/tests/test_sycl_context.py index a88a685e69..4afdd4d90b 100644 --- a/dpctl/tests/test_sycl_context.py +++ b/dpctl/tests/test_sycl_context.py @@ -26,6 +26,7 @@ from .helper import ( create_invalid_capsule, get_sub_device_or_skip, + is_adaptivecpp, skip_if_usm_unsupported, ) @@ -82,6 +83,12 @@ def test_context_not_equals(): ctx_gpu = dpctl.SyclContext("gpu") except dpctl.SyclContextCreationError: pytest.skip() + if is_adaptivecpp() and any( + d.backend == dpctl.backend_type.cuda for d in ctx_gpu.get_devices() + ): + pytest.skip( + "AdaptiveCpp hashes the contexts of cuda:0 and the CPU equally" + ) try: ctx_cpu = dpctl.SyclContext("cpu") except dpctl.SyclContextCreationError: diff --git a/dpctl/tests/test_sycl_queue.py b/dpctl/tests/test_sycl_queue.py index f6a911ddd3..e9ce4d286b 100644 --- a/dpctl/tests/test_sycl_queue.py +++ b/dpctl/tests/test_sycl_queue.py @@ -98,6 +98,10 @@ def test_context_not_equals(): gpuQ = dpctl.SyclQueue("gpu") except dpctl.SyclQueueCreationError: pytest.skip() + if is_adaptivecpp() and gpuQ.sycl_device.backend == dpctl.backend_type.cuda: + pytest.skip( + "AdaptiveCpp hashes the contexts of cuda:0 and the CPU equally" + ) ctx_gpu = gpuQ.get_sycl_context() try: cpuQ = dpctl.SyclQueue("cpu")