MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / load

Function load

crates/test-programs/src/nn.rs:28–34  ·  view source on GitHub ↗

Load a wasi-nn graph from a set of bytes.

(
        bytes: &[Vec<u8>],
        encoding: GraphEncoding,
        target: ExecutionTarget,
    )

Source from the content-addressed store, hash-verified

26
27 /// Load a wasi-nn graph from a set of bytes.
28 pub fn load(
29 bytes: &[Vec<u8>],
30 encoding: GraphEncoding,
31 target: ExecutionTarget,
32 ) -> Result<Graph> {
33 graph::load(bytes, encoding, target).map_err(err_as_anyhow)
34 }
35
36 /// Load a wasi-nn graph by name.
37 pub fn load_by_name(name: &str) -> Result<Graph> {

Callers 15

gen_load_stackMethod · 0.50
gen_load_base_offsetMethod · 0.50
gen_clobber_restoreMethod · 0.50
emitFunction · 0.50
load_dwpFunction · 0.50
vmctx_load_stack_chainFunction · 0.50
document_equivalentFunction · 0.50
load_documentMethod · 0.50
mainFunction · 0.50
mainFunction · 0.50
load_typed_paramsMethod · 0.50

Calls 2

OkFunction · 0.85
newFunction · 0.50

Tested by 1

document_equivalentFunction · 0.40