Add an initial wasi-nn implementation for Wasmtime (#2208)
* Add an initial wasi-nn implementation for Wasmtime This change adds a crate, `wasmtime-wasi-nn`, that uses `wiggle` to expose the current state of the wasi-nn API and `openvino` to implement the exposed functions. It includes an end-to-end test demonstrating how to do classification using wasi-nn: - `crates/wasi-nn/tests/classification-example` contains Rust code that is compiled to the `wasm32-wasi` target and run with a Wasmtime embedding that exposes the wasi-nn calls - the example uses Rust bindings for wasi-nn contained in `crates/wasi-nn/tests/wasi-nn-rust-bindings`; this crate contains code generated by `witx-bindgen` and eventually should be its own standalone crate * Test wasi-nn as a CI step This change adds: - a GitHub action for installing OpenVINO - a script, `ci/run-wasi-nn-example.sh`, to run the classification example
This commit is contained in:
@@ -64,6 +64,7 @@ const CRATES_TO_PUBLISH: &[&str] = &[
|
||||
"wasmtime",
|
||||
"wasmtime-wiggle",
|
||||
"wasmtime-wasi",
|
||||
"wasmtime-wasi-nn",
|
||||
"wasmtime-rust-macro",
|
||||
"wasmtime-rust",
|
||||
"wasmtime-wast",
|
||||
@@ -308,7 +309,10 @@ fn verify(crates: &[Crate]) {
|
||||
.arg("--manifest-path")
|
||||
.arg(&krate.manifest)
|
||||
.env("CARGO_TARGET_DIR", "./target");
|
||||
if krate.name.contains("lightbeam") || krate.name == "witx" {
|
||||
if krate.name.contains("lightbeam")
|
||||
|| krate.name == "witx"
|
||||
|| krate.name.contains("wasi-nn")
|
||||
{
|
||||
cmd.arg("--no-verify");
|
||||
}
|
||||
let status = cmd.status().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user