def print_available_platforms(): """ Print information about SYCL platforms visible to runtime. Environment variable `SYCL_DEVICE_FILTER` affects this list. """ dpctl.lsplatform()
def test_dpctl_api(filter_str): device = dpctl.SyclDevice(filter_str) with dpctl.device_context(device): dpctl.lsplatform() dpctl.get_current_queue() dpctl.get_num_activated_queues() dpctl.is_in_device_context()
def test_dpctl_api(filter_str): if skip_test(filter_str): pytest.skip() device = dpctl.SyclDevice(filter_str) with dppy.offload_to_sycl_device(device): dpctl.lsplatform() dpctl.get_current_queue() dpctl.get_num_activated_queues() dpctl.is_in_device_context()
def test_lsplatform3(): try: dpctl.lsplatform(3) except Exception: pytest.fail("Encountered an exception inside lsplatform().")
def test_lsplatform3(): try: with pytest.warns(UserWarning): dpctl.lsplatform(3) except Exception: pytest.fail("Encountered an exception inside lsplatform().")