You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/12 05:43:26 UTC

[GitHub] [incubator-tvm] kazum commented on pull request #6886: [CI] Pin wasmtime version to 0.16.0

kazum commented on pull request #6886:
URL: https://github.com/apache/incubator-tvm/pull/6886#issuecomment-725851854


   @tqchen There are two kinds of WASI binaries, command and reactor, and what we generate in the test is a command.  A WASI command may not export global variables, but we export two variables, `__tvm_module_ctx` and `__tvm_main__`.
   
   If I changed the llvm linkage type of [this line](https://github.com/apache/incubator-tvm/blob/main/src/target/llvm/codegen_cpu.cc#L229) and [this line](https://github.com/apache/incubator-tvm/blob/main/src/target/llvm/codegen_cpu.cc#L361) to InternalLinkage, I could produce a compatible wasm32 which is runnable with the latest wasmtime, but I think the change is not acceptable for other targets.
   
   Another fix I came up with was localizing those variables with llvm-objcopy after we generate the wasm library.  But the current llvm-objcopy has only initial support for wasm, so we cannot do it yet.
   
   I think it's a reasonable workaround to pin the wasmtime version until llvm-objcopy supports hiding global variables for wasm32. What do you think of it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org