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

2020-07-01 Thread Leon Wang via TVM Discuss
@posutsai I guess this project (https://github.com/kazum/tvm-wasm) from @kazum would offer some helps. --- [Visit Topic](https://discuss.tvm.ai/t/how-to-build-runnable-wasm-on-browser/7048/14) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from

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

2020-06-23 Thread Leon Wang via TVM Discuss
I'm not very sure if you are correct, maybe you could take a look at this PR (https://github.com/apache/incubator-tvm/pull/5892) that compiles tvm runtime into wasm library? --- [Visit Topic](https://discuss.tvm.ai/t/how-to-build-runnable-wasm-on-browser/7048/12) to respond. You are rec

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

2020-06-23 Thread Leon Wang via TVM Discuss
[quote="posutsai, post:8, topic:7048"] Run `cargo build -target=wasm32-wasi --release` in both runtime and frontend directory. After doing this, libtvm_runtime.a and libtvm_frontend.a are successfully generated under `tvm/rust/target/wasm32-wasi/release/` and cargo is able to find it after spe

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

2020-06-23 Thread Leon Wang via TVM Discuss
[quote="posutsai, post:7, topic:7048"] 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. [/quote] Here are some guidances from wasmtime website: https://bytecodealliance.github.io/wa

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

2020-06-22 Thread Leon Wang via TVM Discuss
It's really odd for the mismatch errors because wasmtime should be 100% compatible with wasm32-unknown-unknown. But anyway, it doesn't matter if you change the target to wasm32-wasi. If you only need to deploy model on browser, I believe [tvm-web](https://github.com/apache/incubator-tvm/blob/

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

2020-06-22 Thread Leon Wang via TVM Discuss
@posutsai From what I know, `__tvm_module_ctx` is a global variable compiled in lib_testwasm32.a static library, I don't know if you can find this static library under `rust/runtime/tests/test_wasm32/lib` folder, if not maybe you didn't configure `LLVM_AR` environment variable? --- [Visit

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

2020-06-22 Thread Leon Wang via TVM Discuss
Based on the info shown, could u elaborate more on these questions? - Have you add wasm32-wasi target for rustc? - Have you move the tvm runtime static library into `LD_LABRARY_PATH`? Please notice that currently there are three kind of targets for WebAssembly: wasm32-unknown-emscripten, wasm3

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Leon Wang via TVM Discuss
That's really frustrating, I have tried it again with `cdylib`, but even though I can compiled it into wasm file, but still can't load it successfully using `wasmtime`. --- [Visit Topic](https://discuss.tvm.ai/t/how-to-test-wasm32-target-on-rust-runtime-binding/6947/6) to respond. You a

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Leon Wang via TVM Discuss
I think I get what you were meaning, but actually what I wanted is to compiled this lib into test_wasm.wasm file, so I guess `cdylib` type is required to be set in Cargo.toml, have you tried compiled the lib again using `cdylib` crate-type? Thanks! --- [Visit Topic](https://discuss.tvm.a

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Leon Wang via TVM Discuss
@kazum Sorry for missing attaching the changes in Cargo.toml, actually I set crate-type to `cdylib`, is that something causing the problem? --- [Visit Topic](https://discuss.tvm.ai/t/how-to-test-wasm32-target-on-rust-runtime-binding/6947/3) to respond. You are receiving this because you

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-11 Thread Leon Wang via TVM Discuss
Hi @tqchen @jroesch and others, I was working for embedding TVM Rust runtime for WASM target (see [here](https://github.com/leonwanghui/ms-backend-wasm/tree/master/wasm-backend-tvm) for the details), but came across some problems when building test-wasm32 crate. ## Error elaboration Firstly