-
Notifications
You must be signed in to change notification settings - Fork 759
add a set of apis to configure wasi-nn via InstantiationArgs2 #4764
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
base: main
Are you sure you want to change the base?
add a set of apis to configure wasi-nn via InstantiationArgs2 #4764
Conversation
77794ae to
c73e4aa
Compare
| #include "wasi_nn.h" | ||
|
|
||
| #undef WASM_ENABLE_WASI_EPHEMERAL_NN | ||
| #undef WASI_NN_NAME |
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.
why?
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.
In wasi_ephemeral_nn.h, macros are defined and then wasi_nn.h is included immediately after, but these macro definitions are later undefined (#undef). This means that in utils.h, the macros might be in an undefined state, leading to compilation errors( if WASM_ENABLE_WASI_EPHEMERAL_NN != 0).
… named WASINNRegistry. Replace malloc/free to wasm_runtime_malloc/_free, replace strdup to bh_strdup.
add a set of apis to configure wasi-nn via InstantiationArgs2: