Home
last modified time | relevance | path

Searched refs:graph (Results 1 – 25 of 41) sorted by relevance

12

/wasmtime-44.0.1/crates/environ/src/graphs/
H A Dscc.rs101 &graph, in new()
479 graph.define(0, []); in test_single_node()
493 graph.define(0, [0]); in test_single_node_cycle()
504 graph.define(0, []); in test_disconnected_nodes()
505 graph.define(1, []); in test_disconnected_nodes()
515 graph.define(0, []); in test_chained_nodes()
516 graph.define(1, [0]); in test_chained_nodes()
517 graph.define(2, [1]); in test_chained_nodes()
518 graph.define(3, [2]); in test_chained_nodes()
531 graph.define(0, [3]); in test_simple_multi_node_cycle()
[all …]
H A Ddfs.rs56 pub fn next<G>(&mut self, graph: G, seen: impl Fn(Node) -> bool) -> Option<DfsEvent<Node>> in next()
68 let successors = graph.successors(node); in next()
/wasmtime-44.0.1/crates/wasi-nn/src/
H A Dwit.rs169 impl generated::graph::Host for WasiNnView<'_> {
180 Ok(graph) => { in load()
181 let graph = self.table.push(graph)?; in load() localVariable
182 Ok(Ok(graph)) in load()
205 let graph = graph.clone(); in load_by_name() localVariable
206 let graph = self.table.push(graph)?; in load_by_name() localVariable
207 Ok(Ok(graph)) in load_by_name()
221 graph: Resource<Graph>, in init_execution_context()
225 let graph = self.table.get(&graph)?; in init_execution_context() localVariable
226 match graph.init_execution_context() { in init_execution_context()
[all …]
H A Dwitx.rs135 let graph = if let Some(backend) = self.backends.get_mut(&encoding.into()) { in load() localVariable
152 let graph_id = self.graphs.insert(graph); in load()
162 if let Some(graph) = self.registry.get_mut(&name) { in load_by_name()
163 let graph_id = self.graphs.insert(graph.clone()); in load_by_name()
175 let exec_context = if let Some(graph) = self.graphs.get_mut(graph_id.into()) { in init_execution_context()
176 graph.init_execution_context()? in init_execution_context()
/wasmtime-44.0.1/crates/wasi-nn/wit/
H A Dwasi-nn.wit13 import graph;
63 interface graph {
66 use inference.{graph-execution-context};
69 resource graph {
75 enum graph-encoding {
92 /// The graph initialization data.
96 type graph-builder = list<u8>;
99 …load: func(builder: list<graph-builder>, encoding: graph-encoding, target: execution-target) -> re…
101 /// Load a `graph` by name.
116 /// graph inputs and outputs.
[all …]
/wasmtime-44.0.1/crates/test-programs/src/
H A Dnn.rs23 use self::wasi::nn::graph::{self, Graph};
24 pub use self::wasi::nn::graph::{ExecutionTarget, GraphEncoding}; // Used by tests.
33 graph::load(bytes, encoding, target).map_err(err_as_anyhow) in load()
38 graph::load_by_name(name).map_err(err_as_anyhow) in load_by_name()
43 pub fn classify(graph: Graph, input: (&str, Vec<u8>)) -> Result<Vec<f32>> { in classify()
44 let context = graph.init_execution_context().map_err(err_as_anyhow)?; in classify()
111 pub fn classify(graph: Graph, tensor: Vec<u8>) -> Result<Vec<f32>> { in classify()
112 let mut context = graph.init_execution_context()?; in classify()
/wasmtime-44.0.1/crates/environ/src/
H A Dgraphs.rs46 graph: self, in filter_nodes()
79 graph: G, field
89 .field("graph", &self.graph) in fmt()
106 self.graph.nodes().filter(&self.predicate) in nodes()
115 self.graph.successors(node).filter(&self.predicate) in successors()
/wasmtime-44.0.1/crates/wasi-nn/witx/
H A Dwasi-nn.witx39 (typename $graph (handle))
65 (result $error (expected $graph (error $nn_errno)))
69 (result $error (expected $graph (error $nn_errno)))
72 (param $graph $graph)
/wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-named/src/
H A Dmain.rs5 let graph = GraphBuilder::new(GraphEncoding::Openvino, ExecutionTarget::CPU) in main() localVariable
8 println!("Loaded a graph: {:?}", graph); in main()
10 let mut context = graph.init_execution_context().unwrap(); in main()
/wasmtime-44.0.1/crates/fuzzing/src/generators/gc_ops/
H A Dtypes.rs204 let graph = SupertypeGraph { in sort_types_topo() localVariable
208 let mut dfs = Dfs::new(graph.nodes()); in sort_types_topo()
214 while let Some(event) = dfs.next(&graph, |id| seen.contains(&id)) { in sort_types_topo()
231 let graph = RecGroupGraph { in sort_rec_groups_topo() localVariable
237 let mut dfs = Dfs::new(graph.nodes()); in sort_rec_groups_topo()
243 while let Some(event) = dfs.next(&graph, |id| seen.contains(&id)) { in sort_rec_groups_topo()
258 let graph = SupertypeGraph { in break_supertype_cycles() localVariable
262 let mut dfs = Dfs::new(graph.nodes()); in break_supertype_cycles()
267 while let Some(event) = dfs.next(&graph, |id| seen.contains(&id)) { in break_supertype_cycles()
303 let graph = RecGroupGraph { in break_rec_group_cycles() localVariable
[all …]
/wasmtime-44.0.1/crates/test-programs/src/bin/
H A Dnn_wit_image_classification_openvino_named.rs6 let graph = wit::load_by_name("fixtures")?; in main() localVariable
9 let results = wit::classify(graph, ("input", tensor))?; in main()
H A Dnn_wit_image_classification_winml_named.rs6 let graph = wit::load_by_name("mobilenet")?; in main() localVariable
9 let results = wit::classify(graph, ("input", tensor))?; in main()
H A Dnn_witx_image_classification_openvino_named.rs6 let graph = witx::load_by_name( in main() localVariable
13 let results = witx::classify(graph, tensor)?; in main()
H A Dnn_witx_image_classification_winml_named.rs6 let graph = witx::load_by_name( in main() localVariable
13 let results = witx::classify(graph, tensor)?; in main()
H A Dnn_wit_image_classification_onnx.rs8 let graph = wit::load( in main() localVariable
15 let results = wit::classify(graph, ("input", tensor))?; in main()
H A Dnn_witx_image_classification_onnx.rs8 let graph = witx::load( in main() localVariable
15 let results = witx::classify(graph, tensor)?; in main()
H A Dnn_wit_image_classification_openvino.rs10 let graph = wit::load( in main() localVariable
17 let results = wit::classify(graph, ("input", tensor))?; in main()
H A Dnn_witx_image_classification_openvino.rs10 let graph = witx::load( in main() localVariable
17 let results = witx::classify(graph, tensor)?; in main()
H A Dnn_wit_image_classification_pytorch.rs8 let graph = wit::load( in main() localVariable
15 let output_buffer = wit::classify(graph, ("input", tensor))?; in main()
H A Dnn_witx_image_classification_pytorch.rs8 let graph = witx::load( in main() localVariable
15 let output_buffer = witx::classify(graph, tensor)?; in main()
/wasmtime-44.0.1/crates/wasi-nn/src/registry/
H A Din_memory.rs33 let graph = backend.load_from_dir(path, ExecutionTarget::Cpu)?; in load() localVariable
34 self.0.insert(name.into_owned(), graph); in load()
/wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-named/
H A DREADME.md33 <path>/<to>/wasmtime run --dir=fixture --wasi=nn --wasi=nn-graph=openvino::mobilenet target/wasm32-…
36 The primary difference is the addition of `--wasi=nn-graph=openvino::mobilenet`:
40 of the path passed in `--nn-graph=<encoding>::<path>`.
/wasmtime-44.0.1/crates/wasi-nn/examples/classification-example/src/
H A Dmain.rs11 let graph = unsafe { in main() localVariable
21 let context = unsafe { wasi_nn::init_execution_context(graph).unwrap() }; in main()
/wasmtime-44.0.1/crates/wasi-nn/examples/classification-component-onnx/src/
H A Dmain.rs16 graph::{Graph, GraphBuilder, load, ExecutionTarget, GraphEncoding},
58 let graph = load(&[model], GraphEncoding::Onnx, execution_target).unwrap(); in main() localVariable
61 let exec_context = Graph::init_execution_context(&graph).unwrap(); in main()
/wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-pytorch/src/
H A Dmain.rs9 let graph = GraphBuilder::new(GraphEncoding::Pytorch, ExecutionTarget::CPU) in main() localVariable
12 let mut context = graph.init_execution_context()?; in main()

12