Skip to content

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

Merged
abrown merged 2 commits into
bytecodealliance:mainfrom
abrown:bench-wasi-flags
Sep 23, 2022
Merged

bench-api: configure WASI modules based on passed flags#4207
abrown merged 2 commits into
bytecodealliance:mainfrom
abrown:bench-wasi-flags

Conversation

@abrown
Copy link
Copy Markdown
Member

@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
Copy Markdown
Contributor

Looks good to me @abrown , thanks.

Copy link
Copy Markdown
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
Copy Markdown
Member 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