I already checked the repo and tried before post the question and it seems not 
working if the PC has no GPU available. Even though I manually deactivate the 
GPU part and switch to CPU version just like code snippet in question, it cause 
error when I try to call `inst.systemLib()` function. Looks like the error 
comes from interaction between JS and wasm.

Another reason why I view building model to WebAssembly from rust is a better 
way is that webgpu is relatively unstable feature for browsers. Even google 
chrome requires user to activate it manually. At least in my case JS runtime is 
not compatible when the model is running on a PC without a GPU card.

Anyway, I will try to mimic the example 
[resnet](https://github.com/apache/incubator-tvm/tree/master/rust/frontend/examples/resnet)
 under frontend directory and follow the pipeline just like test_wasm32 
example. As for those three types of target, is there any detail spec about the 
difference among them? or could you give me some hint about their corresponding 
use case.

The only biggest difference I know is `wasm32-wasi` is able to provide features 
like `malloc`, `fread` .... these kinds of function calls that previously not 
support in WebAssembly sandbox. Thank you for replying my question. Having 
these discussion really helps me a lot.





---
[Visit 
Topic](https://discuss.tvm.ai/t/how-to-build-runnable-wasm-on-browser/7048/7) 
to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/fff0b50853fd6ca21d8dbaea0341ee85d749eaa2884d5e2b9b9fdb6d23959efe).

Reply via email to