Tree:
4e3038372f
cfallin/lucet-pr612-base
fitzgen-patch-1
main
pch/bound_tcp_userland_buffer
pch/bump_wasm_tools_210
pch/cli_wasi_legacy
pch/component_call_hooks
pch/resource_table
pch/resource_table_2
pch/upstream_wave
release-0.32.0
release-0.33.0
release-0.34.0
release-0.35.0
release-0.36.0
release-0.37.0
release-0.38.0
release-0.39.0
release-0.40.0
release-1.0.0
release-10.0.0
release-11.0.0
release-12.0.0
release-13.0.0
release-14.0.0
release-15.0.0
release-16.0.0
release-17.0.0
release-18.0.0
release-19.0.0
release-2.0.0
release-20.0.0
release-21.0.0
release-22.0.0
release-23.0.0
release-24.0.0
release-3.0.0
release-4.0.0
release-5.0.0
release-6.0.0
release-7.0.0
release-8.0.0
release-9.0.0
revert-9191-trevor/upgrade-regalloc
revert-union-find
stable-v0.26
trevor/fuzz-pcc
trevor/hyper-rc4
trevor/io-error-interface
0.2.0
0.3.0
cranelift-v0.31.0
cranelift-v0.32.0
cranelift-v0.33.0
cranelift-v0.34.0
cranelift-v0.35.0
cranelift-v0.36.0
cranelift-v0.37.0
cranelift-v0.39.0
cranelift-v0.40.0
cranelift-v0.41.0
cranelift-v0.42.0
cranelift-v0.43.0
cranelift-v0.43.1
cranelift-v0.44.0
cranelift-v0.45.0
cranelift-v0.46.0
cranelift-v0.46.1
cranelift-v0.60.0
cranelift-v0.61.0
cranelift-v0.62.0
cranelift-v0.69.0
dev
filecheck-v0.0.1
minimum-viable-wasi-proxy-serve
v0.10.0
v0.11.0
v0.12.0
v0.15.0
v0.16.0
v0.17.0
v0.18.0
v0.19.0
v0.2.0
v0.20.0
v0.21.0
v0.22.0
v0.22.1
v0.23.0
v0.24.0
v0.25.0
v0.26.0
v0.26.1
v0.27.0
v0.28.0
v0.29.0
v0.3.0
v0.30.0
v0.31.0
v0.32.0
v0.32.1
v0.33.0
v0.33.1
v0.34.0
v0.34.1
v0.34.2
v0.35.0
v0.35.1
v0.35.2
v0.35.3
v0.36.0
v0.37.0
v0.38.0
v0.38.1
v0.38.2
v0.38.3
v0.39.0
v0.39.1
v0.4.0
v0.40.0
v0.40.1
v0.6.0
v0.8.0
v0.9.0
v1.0.0
v1.0.1
v1.0.2
v10.0.0
v10.0.1
v10.0.2
v11.0.0
v11.0.1
v11.0.2
v12.0.0
v12.0.1
v12.0.2
v13.0.0
v13.0.1
v14.0.0
v14.0.1
v14.0.2
v14.0.3
v14.0.4
v15.0.0
v15.0.1
v16.0.0
v17.0.0
v17.0.1
v17.0.2
v17.0.3
v18.0.0
v18.0.1
v18.0.2
v18.0.3
v18.0.4
v19.0.0
v19.0.1
v19.0.2
v2.0.0
v2.0.1
v2.0.2
v20.0.0
v20.0.1
v20.0.2
v21.0.0
v21.0.1
v22.0.0
v23.0.0
v23.0.1
v23.0.2
v24.0.0
v3.0.0
v3.0.1
v4.0.0
v4.0.1
v5.0.0
v5.0.1
v6.0.0
v6.0.1
v6.0.2
v7.0.0
v7.0.1
v8.0.0
v8.0.1
v9.0.0
v9.0.1
v9.0.2
v9.0.3
v9.0.4
${ noResults }
12 Commits (4e3038372fff8659531de3b286628c3f1c58eb6e)
Author | SHA1 | Message | Date |
---|---|---|---|
Alex Crichton |
183cb0f2f8
|
Swap the order of directories in `--dir` (#7301)
This commit changes the `--dir` argument on the `wasmtime` CLI to be `HOST::GUEST` rather than `GUEST::HOST`. This matches Docker for example and is a little more consistent with only `--dir path` where the first argument is always treated as a host directory. In terms of breaking-ness the movement from `--mapdir` to `--dir` hasn't been released with Wasmtime 14 yet so my hope is that this can land on both `main` and Wasmtime 14.0.0 before it's released to avoid any breakage other than existing scripts migrating from `--mapdir` to `--dir`. |
1 year ago |
Alex Crichton |
8995750aa4
|
Redesign Wasmtime's CLI (#6925)
* Redesign Wasmtime's CLI This commit follows through on discussion from #6741 to redesign the flags that the `wasmtime` binary accepts on the CLI. Almost all flags have been renamed/moved and will require callers to update. The main motivation here is to cut down on the forest of options in `wasmtime -h` which are difficult to mentally group together and understand. The main change implemented here is to move options behind "option groups" which are intended to be abbreviated with a single letter: * `-O foo` - an optimization or performance-tuning related option * `-C foo` - a codegen option affecting the compilation process. * `-D foo` - a debug-related option * `-W foo` - a wasm-related option, for example changing wasm semantics * `-S foo` - a WASI-related option, configuring various proposals for example Each option group can be explored by passing `help`, for example `-O help`. This will print all options within the group along with their help message. Additionally `-O help-long` can be passed to print the full comment for each option if desired. Option groups can be specified multiple times on the command line, for example `-Wrelaxed-simd -Wthreads`. They can also be combined together with commas as `-Wrelaxed-simd,threads`. Configuration works as a "last option wins" so `-Ccache,cache=n` would end up with a compilation cache disabled. Boolean options can be specified as `-C foo` to enable `foo`, or they can be specified with `-Cfoo=$val` with any of `y`, `n`, `yes`, `no`, `true`, or `false`. All other options require a `=foo` value to be passed and the parsing depends on the type. This commit additionally applies a few small refactorings to the CLI as well. For example the help text no longer prints information about wasm features after printing the option help. This is still available via `-Whelp` as all wasm features have moved from `--wasm-features` to `-W`. Additionally flags are no longer conditionally compiled in, but instead all flags are always supported. A runtime error is returned if support for a flag is not compiled in. Additionally the "experimental" name of WASI proposals has been dropped in favor of just the name of the proposal, for example `--wasi nn` instead of `--wasi-modules experimental-wasi-nn`. This is intended to mirror how wasm proposals don't have "experimental" in the name and an opt-in is required regardless. A full listing of flags and how they have changed is: | old cli flag | new cli flag | |-----------------------------------------------|-------------------------------------------------| | `-O, --optimize` | removed | | `--opt-level <LEVEL>` | `-O opt-level=N` | | `--dynamic-memory-guard-size <SIZE>` | `-O dynamic-memory-guard-size=...` | | `--static-memory-forced` | `-O static-memory-forced` | | `--static-memory-guard-size <SIZE>` | `-O static-memory-guard-size=N` | | `--static-memory-maximum-size <MAXIMUM>` | `-O static-memory-maximum-size=N` | | `--dynamic-memory-reserved-for-growth <SIZE>` | `-O dynamic-memory-reserved-for-growth=...` | | `--pooling-allocator` | `-O pooling-allocator` | | `--disable-memory-init-cow` | `-O memory-init-cow=no` | | `--compiler <COMPILER>` | `-C compiler=..` | | `--enable-cranelift-debug-verifier` | `-C cranelift-debug-verifier` | | `--cranelift-enable <SETTING>` | `-C cranelift-NAME` | | `--cranelift-set <NAME=VALUE>` | `-C cranelift-NAME=VALUE` | | `--config <CONFIG_PATH>` | `-C cache-config=..` | | `--disable-cache` | `-C cache=no` | | `--disable-parallel-compilation` | `-C parallel-compilation=no` | | `-g` | `-D debug-info` | | `--disable-address-map` | `-D address-map=no` | | `--disable-logging` | `-D logging=no` | | `--log-to-files` | `-D log-to-files` | | `--coredump-on-trap <PATH>` | `-D coredump=..` | | `--wasm-features all` | `-W all-proposals` | | `--wasm-features -all` | `-W all-proposals=n` | | `--wasm-features bulk-memory` | `-W bulk-memory` | | `--wasm-features multi-memory` | `-W multi-memory` | | `--wasm-features multi-value` | `-W multi-value` | | `--wasm-features reference-types` | `-W reference-types` | | `--wasm-features simd` | `-W simd` | | `--wasm-features tail-call` | `-W tail-call` | | `--wasm-features threads` | `-W threads` | | `--wasm-features memory64` | `-W memory64` | | `--wasm-features copmonent-model` | `-W component-model` | | `--wasm-features function-references` | `-W function-references` | | `--relaxed-simd-deterministic` | `-W relaxed-simd-deterministic` | | `--enable-cranelift-nan-canonicalization` | `-W nan-canonicalization` | | `--fuel <N>` | `-W fuel=N` | | `--epoch-interruption` | `-W epoch-interruption` | | `--allow-unknown-exports` | `-W unknown-exports-allow` | | `--trap-unknown-imports` | `-W unknown-imports-trap` | | `--default-values-unknown-imports` | `-W unknown-imports-default` | | `--max-instances <MAX_INSTANCES>` | `-W max-instances=N` | | `--max-memories <MAX_MEMORIES>` | `-W max-memories=N` | | `--max-memory-size <BYTES>` | `-W max-memory-size=N` | | `--max-table-elements <MAX_TABLE_ELEMENTS>` | `-W max-table-elements=N` | | `--max-tables <MAX_TABLES>` | `-W max-tables=N` | | `--max-wasm-stack <MAX_WASM_STACK>` | `-W max-wasm-stack=N` | | `--trap-on-grow-failure` | `-W trap-on-grow-failure` | | `--wasm-timeout <TIME>` | `-W timeout=N` | | `--wmemcheck` | `-W wmemcheck` | | `--wasi-modules default` | removed | | `--wasi-modules -default` | removed | | `--wasi-modules wasi-common` | `-S common` | | `--wasi-modules -wasi-common` | `-S common=n` | | `--wasi-modules experimental-wasi-nn` | `-S nn` | | `--wasi-modules experimental-wasi-threads` | `-S threads` | | `--wasi-modules experimental-wasi-http` | `-S http` | | `--listenfd` | `-S listenfd` | | `--tcplisten <SOCKET ADDRESS>` | `-S tcplisten=...` | | `--wasi-nn-graph <FORMAT::HOST>` | `-S nn-graph=FORMAT::HOST` | | `--preview2` | `-S preview2` | | `--dir <DIRECTORY>` | `--dir ...` | | `--mapdir <GUEST_DIR::HOST_DIR>` | `--dir a::b` | * Be more descriptive with help text * Document `=val` is optional for `-Ccranelift-xxx` * Fix compile after rebase * Fix rebase of `--inherit-network` * Fix wasi-http test * Fix compile without pooling allocator support * Update some flags in docs * Fix bench-api build * Update flags for gdb/lldb tests * Fixup optimization flags prtest:full |
1 year ago |
Andrew Brown |
770c5d0f3f
|
wasi-nn: add named models (#6854)
* wasi-nn: add [named models] This change adds a way to retrieve preloaded ML models (i.e., "graphs" in wasi-nn terms) from a registry. The wasi-nn specification includes a new function, `load_by_name`, that can be used to access these models more efficiently than before; previously, a user's only option was to read/download/etc. all of the bytes of an ML model and pass them to the `load` function. [named models]: https://github.com/WebAssembly/wasi-nn/issues/36 In Wasmtime's implementation of wasi-nn, we call the registry that holds the models a `GraphRegistry`. We include a simplistic `InMemoryRegistry` for use in the Wasmtime CLI (more on this later) but the idea is that production use will involve some more complex caching and thus a new implementation of a registry--a `Box<dyn GraphRegistry>`--passed into the wasi-nn context. Note that, because we now must be able to `clone` a graph out of the registry and into the "used graphs" table, the OpenVINO `BackendGraph` is updated to be easier to copy around. To allow experimentation with this "preload a named model" functionality, this change also adds a new Wasmtime CLI flag: `--graph <encoding>:<host dir>`. Wasmtime CLI users can now preload a model from a directory; the directory `basename` is used as the model name. Loading models from a directory is probably not desired in Wasmtime embeddings so it is cordoned off into a separate `BackendFromDir` extension trait. * wasi-nn: add "named model" test Add a new example crate which loads a model by name and performs image classification. It uses the same MobileNet model as the existing test but a new version of the Rust bindings. The new crate is built and run with the new CLI flag in the `ci/run-wasi-nn-example.sh` script. prtest:full * review: rename `--graph` to `--wasi-nn-graph` |
1 year ago |
Alex Crichton |
8091556514
|
Require wasmtime options are first when running modules (#6737)
* Require wasmtime options are first when running modules Currently the way we've configured argument parsing it's valid to execute a command such as: wasmtime run foo.wasm -O which is the same as: wasmtime run -O foo.wasm or otherwise all flags are attempted to be parsed as Wasmtime flags and an error is generated when they're not wasmtime flags. I've personally found this a bit confusing in the past and I find myself frequently executing: wasmtime run -- foo.wasm -other -arguments While this works my general impression is that many other "wrapper commands" don't behave this way and typically don't require `--` to pass flags to the target executable. This commit reconfigures argument parsing to consider any argument after the WebAssembly module itself to be an argument to the wasm program rather than an argument to Wasmtime. This means that all Wasmtime options must come between the `run` command and the `foo.wasm` WebAssembly argument. * Update wasi testsuite runner * Support `wasmtime -- run` Additionally use more clap features to avoid manually checking against subcommands. * Remove stale comment * Reorder wasi-nn arguments * Reorder more flags * Fix unused import on Windows * Don't run a stdio test on Windows * Update gdb/lldb tests * Don't assert that the write succeeds prtest:full |
1 year ago |
Andrew Brown |
5ba0d696b7
|
ci: unpin the wasi-nn tasks from an older Ubuntu (#6089)
* ci: unpin the wasi-nn tasks from an older Ubuntu Previously, OpenVINO's lack of APT packages for Ubuntu 22.04 (`jammy`) prevented us from upgrading the GitHub runner to use `ubuntu-latest`. I updated the `install-openvino-action` to substitute in the `focal` packages in this case (this is what the OpenVINO team considers the fix) so this pin should no longer be necessary. Fixes #5408. (Run all CI actions: prtest:full) * vet: audit the openvino version bump |
2 years ago |
Andrew Brown |
558a9273e9
|
wasi-nn: update openvino crate, use external CI action (#4383)
* ci: replace OpenVINO installer action To test wasi-nn, we currently use an OpenVINO backend. The Wasmtime CI must install OpenVINO using a custom GitHub action. This CI action has not been updated in some time and in the meantime OpenVINO (and the OpenVINO crates) have released several new versions. https://github.com/abrown/install-openvino-action is an external action that we plan to keep up to date with the latest releases. This change replaces the current CI action with that one. * wasi-nn: upgrade openvino dependency to v0.4.1 This eliminates a `lazy_static` dependency and changes a few parameters to pass by reference. Importantly, it enables support for the latest versions of OpenVINO (v2022.*) in wasi-nn. * ci: update wasi-nn script to source correct env script * ci: really use the correct path for the env script Also, clarify which directory OpenVINO is installed in (the symlink may not be present). |
2 years ago |
Brian Jones |
65b443ad23
|
Fix for issue #3948 (#3956)
Updates the OpenVINO backend for wasi-nn to pre-configure all inputs as `NHWC`. This is not a long-term fix but no worse than the status quo, which configures all input tensors to the same layout. This change updates the CI script to use the latest version of OpenVINO. Closes #3948. Co-authored-by: Andrew Brown <andrew.brown@intel.com> |
3 years ago |
Andrew Brown |
92e0b6b9e8
|
wasi-nn: turn it on by default (#2859)
* wasi-nn: turn it on by default This change makes the wasi-nn Cargo feature a default feature. Previously, a wasi-nn user would have to build a separate Wasmtime binary (e.g. `cargo build --features wasi-nn ...`) to use wasi-nn and the resulting binary would require OpenVINO shared libraries to be present in the environment in order to run (otherwise it would fail immediately with linking errors). With recent changes to the `openvino` crate, the wasi-nn implementation can defer the loading of the OpenVINO shared libraries until runtime (i.e., when the user Wasm program calls `wasi_ephemeral_nn::load`) and display a user-level error if anything goes wrong (e.g., the OpenVINO libraries are not present on the system). This runtime-linking addition allows the wasi-nn feature to be turned on by default and shipped with upcoming releases of Wasmtime. This change should be transparent for users who do not use wasi-nn: the `openvino` crate is small and the newly-available wasi-nn imports only affect programs in which they are used. For those interested in reviewing the runtime linking approach added to the `openvino` crate, see https://github.com/intel/openvino-rs/pull/19. * wasi-nn spec path: don't use canonicalize * Allow dependencies using the ISC license The ISC license should be [just as permissive](https://choosealicense.com/licenses/isc) as MIT, e.g., with no additional limitations. * Add a `--wasi-modules` flag This flag controls which WASI modules are made available to the Wasm program. This initial commit enables `wasi-common` by default (equivalent to `--wasi-modules=all`) and allows `wasi-nn` and `wasi-crypto` to be added in either individually (e.g., `--wasi-modules=wasi-nn`) or as a group (e.g., `--wasi-modules=all-experimental`). * wasi-crypto: fix unused dependency Co-authored-by: Pat Hickey <pat@moreproductive.org> |
4 years ago |
Andrew Brown | e9e4afe2c7 |
wasi-nn: use the MobileNet model instead of AlexNet
The MobileNet model is significantly smaller in size (14MB) than the AlexNet model (233MB); this change should reduce bandwidth used during CI. |
4 years ago |
Andrew Brown |
d07fffeb41
|
Use AlexNet for wasi-nn example (#2474)
|
4 years ago |
Andrew Brown |
2f0abc3d74
|
Avoid removing wasi-nn temp directory when specified (#2465)
Since downloading the wasi-nn artifacts take a bit of time, the example script's first argument serves as a directory to reuse for running this script. This change cleans up temporary directories only when a directory was not specified. |
4 years ago |
Andrew Brown |
a61f068c64
|
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 |
4 years ago |