[TVM Discuss] [Questions] How to build runnable wasm on browser?

2020-06-23 Thread Posutsai via TVM Discuss
I've checked the commit you mention above. According to my understanding, the commit focus on giving a example demonstrating how to save customized op and load it until runtime. Despite the use case is slightly different than mine, I believe the building pipeline still works on my case. In con

[TVM Discuss] [Questions] How to build runnable wasm on browser?

2020-06-23 Thread Posutsai via TVM Discuss
Well, I admit compilation of `libtvm_runtime.a` seems a little bit odd. But without the static runtime library, rustc says the compilation is failed due to lack of `tvm_runtime`. In addition, I find the building procedure in the [tvm-wasm](https://github.com/kazum/tvm-wasm) asks user to run `c

[TVM Discuss] [Questions] How to build runnable wasm on browser?

2020-06-23 Thread Posutsai via TVM Discuss
I have tried the pipeline on resnet model and when running in wasmtime runtime seems like there are still some symbol that is undefined for example, `env::TVMArrayCopyFromBytes`. Here's what I've hone. When I specify `tvm_runtime` path in `Cargo.toml` just like test_wasm32 did. [dependen

[TVM Discuss] [Questions] How to build runnable wasm on browser?

2020-06-22 Thread Posutsai via TVM Discuss
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. Loo

[TVM Discuss] [Questions] How to build runnable wasm on browser?

2020-06-22 Thread Posutsai via TVM Discuss
After checking `__tvm_module_ctx ` in libtest_wasm32.a, it occurs to me that there is a mismatch between `lib.save` in [build_test_lib.py line 35](https://github.com/apache/incubator-tvm/blob/master/rust/runtime/tests/test_wasm32/src/build_test_lib.py#L35) and [.cargo/config](https://github.c

[TVM Discuss] [Questions] How to build runnable wasm on browser?

2020-06-22 Thread Posutsai via TVM Discuss
Thank you for reply. Yes, I have double check the target in `.cargo/config` and it is `wasm32-wasi`. I doubt the linking path issue first as well but error still comes out after I add to the path. To get more specific, when run `cargo build` on `tvm/rust/runtime/tests/test_wasm32`, the error

[TVM Discuss] [Questions] How to build runnable wasm on browser?

2020-06-22 Thread Posutsai via TVM Discuss
I would like to deploy my network model on browser and perform inference with WebAssembly on client side and there are several examples that relate to my intention. However, none of these example help me successfully build the app. First I notice that there is a web app [example](https://gith