Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bench-api: configure WASI modules based on passed flags #4207

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Jun 2, 2022

When benchmarking in Sightglass, @brianjjones has found it necessary to
enable the wasi-nn module. The current way to do so is to alter the
engine build script to pass --features wasi-nn so that this crate can
run code relying on these imports. This change allows the user to
instead pass the WASI modules using the engine flags added in #4096.
This could look something like the following in Sightglass:

sightglass-cli benchmark ... --engine-flags '--wasi-modules experimental-wasi-nn'

@abrown abrown requested a review from fitzgen June 2, 2022 00:48
@brianjjones
Copy link
Contributor

Looks good to me @abrown , thanks.

Copy link
Contributor

@jameysharp jameysharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good idea to me!

When benchmarking in Sightglass, @brianjjones has found it necessary to
enable the wasi-nn module. The current way to do so is to alter the
engine build script to pass `--features wasi-nn` so that this crate can
run code relying on these imports. This change allows the user to
instead pass the WASI modules using the engine flags added in bytecodealliance#4096.
This could look something like the following in Sightglass:

```
sightglass-cli benchmark ... --engine-flags '--wasi-modules experimental-wasi-nn'
```
@abrown
Copy link
Contributor Author

abrown commented Sep 23, 2022

Looks like the build is passing fine now; merging...

@abrown abrown merged commit 5a288c2 into bytecodealliance:main Sep 23, 2022
@abrown abrown deleted the bench-wasi-flags branch September 23, 2022 18:36
jameysharp added a commit to jameysharp/wasmtime that referenced this pull request Sep 25, 2022
This fixes a compile-time error introduced in bytecodealliance#4207. The `?` operator
doesn't work inside `Option::map` because it tries to return from the
inner closure, not the outer function.

Apparently our CI doesn't build wasmtime-bench-api so it didn't catch
this issue.
abrown pushed a commit that referenced this pull request Sep 26, 2022
This fixes a compile-time error introduced in #4207. The `?` operator
doesn't work inside `Option::map` because it tries to return from the
inner closure, not the outer function.

Apparently our CI doesn't build wasmtime-bench-api so it didn't catch
this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants