MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / load

Function load

plugins/wasi_nn/wasinnfunc.cpp:25–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 spdlog::error("[WASI-NN] Unknown backend {}."sv, static_cast<uint32_t>(B));
24}
25Expect<WASINN::ErrNo> load(WASINN::WasiNNEnvironment &Env,
26 Span<const Span<uint8_t>> Builders,
27 WASINN::Backend Backend, WASINN::Device Device,
28 uint32_t &GraphId) {
29 switch (Backend) {
30#define EACH(B) \
31 case WASINN::Backend::B: \
32 return WASINN::B::load(Env, Builders, Device, GraphId);
33 FOR_EACH_BACKEND(EACH)
34#undef EACH
35 default:
36 reportUnknownBackend(Backend);
37 return WASINN::ErrNo::InvalidEncoding;
38 }
39}
40#ifdef WASMEDGE_BUILD_WASI_NN_RPC
41WASINN::ErrNo metadataToErrNo(
42 const std::multimap<grpc::string_ref, grpc::string_ref> &Metadata) {

Callers 1

bodyImplMethod · 0.70

Calls 1

reportUnknownBackendFunction · 0.85

Tested by

no test coverage detected