WenheLI opened a new issue #6363: URL: https://github.com/apache/incubator-tvm/issues/6363
After compiling &. building the tvm-wasm runtime followed by this [doc](https://github.com/apache/incubator-tvm/tree/master/web), I am able to get the wasm package. However, when I try to run the demo example: ```js const path = require("path"); const fs = require("fs"); const tvmjs = require("../../dist"); const wasmPath = tvmjs.wasmPath(); const EmccWASI = require(path.join(wasmPath, "tvmjs_runtime.wasi.js")); const wasmSource = fs.readFileSync(path.join(wasmPath, "tvmjs_runtime.wasm")); // Here we pass the javascript module generated by emscripten as the // LibraryProvider to provide WASI related libraries. // the async version of the API. tvmjs.instantiate(wasmSource, new EmccWASI()) .then((tvm) => { // List all the global functions from the runtime. console.log("Runtime functions using EmccWASI\n", tvm.listGlobalFuncNames()); }); ``` I got the following errors: ```bash missing function: main -1 exception thrown: RuntimeError: abort(-1). Build with -s ASSERTIONS=1 for more info.,RuntimeError: abort(-1). Build with -s ASSERTIONS=1 for more info. at abort (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:9655) at _main (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:68366) at <anonymous>:wasm-function[1265]:0x48018 at _start (<anonymous>:wasm-function[571]:0x28a83) at EmccWASI.Module.__start (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:88834) at callMain (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:89545) at doRun (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:90124) at run (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:90296) at runCaller (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:89392) at removeRunDependency (/Users/ericli/Desktop/dev/tvm/web/dist/wasm/tvmjs_runtime.wasi.js:3:9402) ``` Any insight on how to fix it? Thanks in advance! ---------------------------------------------------------------- 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: [email protected]
