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
def test_relay_backend_bad_exec(): with pytest.raises(Exception): load_backend("relay", dict(target="cpu", exec_kind="potato"))
def test_relay_backend_bad_device(): with pytest.raises(Exception): load_backend("relay", dict(target="cuda", device_id=31))
def test_relay_backend_bad_device(): with pytest.raises(Exception): load_backend('relay', dict(target='cuda', device_id=31))
def test_nnvm_backend_bad_device(): with pytest.raises(Exception): load_backend('nnvm', dict(target="cuda", device_id=31))