Wenyong Huang
Wenyong Huang
Hi, please try applying below patch, rebuild wamrc and then use it to generate aot file again: ```diff diff --git a/core/iwasm/compilation/aot_llvm.c b/core/iwasm/compilation/aot_llvm.c index df07c3ca..e1a13433 100644 --- a/core/iwasm/compilation/aot_llvm.c +++ b/core/iwasm/compilation/aot_llvm.c @@...
@tonibofarull I tried to debug it and basically found the root cause, and submitted PR https://github.com/bytecodealliance/wasm-micro-runtime/pull/3597 for a review. After applying the change, the running result of iwasm is basically...
BTW, I used API `TfLiteTensorCopyFromBuffer` and `TfLiteTensorCopyToBuffer` instead, the related document can be found: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/core/c/c_api.h#L57-L71 https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/core/c/c_api.h#L632-L641 And they are also used in WasmEdge's implementation: https://github.com/WasmEdge/WasmEdge/blob/master/plugins/wasi_nn/tfl.cpp#L135-L140 https://github.com/WasmEdge/WasmEdge/blob/master/plugins/wasi_nn/tfl.cpp#L166
@tonibofarull Thanks for the explanation. To be frankly, I am not familiar with wasi-nn, I just tried to debug the issue and happened to make the example run good after...
Is there any idea from you about how to add the wasi-nn interface? And when should it be called?
@tonibofarull I forwarded the issue to @abrown in internal meeting and he mentioned there are similar requirements from other developers and they are planning to add wasi-nn interfaces to set...
@Messi-Q thanks for spotting the issue, from the call stack dumped, the stack-buffer-overflow occurs in function mask_signals in file posix_thread.c, L580: https://github.com/bytecodealliance/wasm-micro-runtime/blob/4c2af25aff9de6df2c23083840f1ff783e7ebbcb/core/shared/platform/common/posix/posix_thread.c#L572-L580 But as you see, this function is set...
@WenLY1 Many people may not know the background and the design details of the shared heap, I submitted issue #3546 to try to illustrate that, suggest you to post tasks...
@sohide we refined the code with #3704, could you please try again? Thanks.
@woodsmc Thanks for the updating, it is great! Though this update only includes the interpreter mode, it is also fantastic and will definitely be a good start for AOT mode...