Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions dpctl/tests/test_sycl_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def test_context_equals():
try:
ctx1 = dpctl.SyclContext("gpu")
ctx0 = dpctl.SyclContext("gpu")
except dpctl.SyclQueueCreationError:
except ValueError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good. I think we may as well introduce SyclContextCreationError and use that, for symmetry,

pytest.skip()
assert ctx0.equals(ctx1)

Expand All @@ -373,7 +373,10 @@ def test_context_can_be_used_in_queue(valid_filter):


def test_context_can_be_used_in_queue2(valid_filter):
d = dpctl.SyclDevice(valid_filter)
try:
d = dpctl.SyclDevice(valid_filter)
except ValueError:
pytest.skip()
if d.default_selector_score < 0:
# skip test for devices rejected by default selector
pytest.skip()
Expand Down
1 change: 1 addition & 0 deletions dpctl/tests/test_sycl_queue_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def test_is_in_device_context_inside_nested_device_ctxt(self):


@unittest.skipIf(not has_sycl_platforms(), "No SYCL platforms available")
@unittest.skipUnless(has_gpu(), "No OpenCL GPU queues available")
class TestGetCurrentDevice(unittest.TestCase):
def test_get_current_device_type_outside_device_ctxt(self):
self.assertNotEqual(dpctl.get_current_device_type(), None)
Expand Down