示例#1
0
def backend_opt(request):
    name, options = request.param
    try:
        b = load_backend(name, options)
    except LoadingError as e:
        pytest.skip(f"Can't load {name}: {e.__cause__}")
    return b
示例#2
0
def test_relay_backend_bad_exec():
    with pytest.raises(Exception):
        load_backend("relay", dict(target="cpu", exec_kind="potato"))
示例#3
0
def test_relay_backend_bad_device():
    with pytest.raises(Exception):
        load_backend("relay", dict(target="cuda", device_id=31))
示例#4
0
def test_relay_backend_bad_device():
    with pytest.raises(Exception):
        load_backend('relay', dict(target='cuda', device_id=31))
示例#5
0
def test_nnvm_backend_bad_device():
    with pytest.raises(Exception):
        load_backend('nnvm', dict(target="cuda", device_id=31))