-
Notifications
You must be signed in to change notification settings - Fork 628
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
Add wasi_ephemeral_nn
module support
#3241
Add wasi_ephemeral_nn
module support
#3241
Conversation
@tonibofarull could you help review this PR? Thanks a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
core/iwasm/common/wasm_native.c
Outdated
if (!wasm_native_register_natives("wasi_nn", native_symbols, | ||
n_native_symbols)) | ||
goto fail; | ||
#if WASM_ENABLE_WASI_EPHEMERAL_NN != 0 | ||
n_native_symbols = get_wasi_ephemeral_nn_export_apis(&native_symbols); | ||
if (!wasm_native_register_natives("wasi_ephemeral_nn", native_symbols, | ||
n_native_symbols)) | ||
goto fail; | ||
#endif /* WASM_ENABLE_WASI_EPHEMERAL_NN != 0 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly believe that we shouldn't replicate the code but instead define here wasi_nn
or wasi_ephemeral_nn
as part of the configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before deprecating wasi_nn
I'd give the option to select one or the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly believe that we shouldn't replicate the code but instead define here
wasi_nn
orwasi_ephemeral_nn
as part of the configuration.
It seems there are slight difference in this file between original wasi_nn_xx()
and newly added wasi_ephemeral_nn_xx()
. I am wondering can merge both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd consider on supporting only 1 at a time and update the implementation of wasi_nn_xx
and wasi_ephemeral_nn
, if there are any.
7cbf4be
to
e9e7906
Compare
@AuYang261 I have just merged PR #3246 to disable running CodeQL CI on each pull request, or it will run for a long time and fail eventually. Could you please rebase your branch with WAMR main? |
No problem. |
e9e7906
to
ddff5c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to verify later on why there's this drift from one to the other.
@AuYang261, @tonibofarull the code seems good now, I merged the PR. Please submit a new PR to enhance it if needed. |
Add `wasi_ephemeral_nn` module support with optional cmake variable, which was mentioned in bytecodealliance#3229.
Add
wasi_ephemeral_nn
module support with optional cmake variable, which mentioned in #3229.