Ejemplo n.º 1
0
def print_available_platforms():
    """
    Print information about SYCL platforms visible to runtime.

    Environment variable `SYCL_DEVICE_FILTER` affects this list.
    """
    dpctl.lsplatform()
Ejemplo n.º 2
0
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()
Ejemplo n.º 3
0
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()
Ejemplo n.º 4
0
def test_lsplatform3():
    try:
        dpctl.lsplatform(3)
    except Exception:
        pytest.fail("Encountered an exception inside lsplatform().")
Ejemplo n.º 5
0
def test_lsplatform3():
    try:
        with pytest.warns(UserWarning):
            dpctl.lsplatform(3)
    except Exception:
        pytest.fail("Encountered an exception inside lsplatform().")