web-llm icon indicating copy to clipboard operation
web-llm copied to clipboard

RuntimeError: Cannot find libraries: wasm_runtime.bc

Open jan-www opened this issue 1 year ago • 1 comments

failed to find library when building model

Traceback (most recent call last):
  File "/Users/wangxj/web-llm/build.py", line 200, in <module>
    build(mod, ARGS)
  File "/Users/wangxj/web-llm/build.py", line 174, in build
    ex.export_library(os.path.join(args.artifact_path, output_filename))
  File "/Users/wangxj/web-llm/venv/lib/python3.9/site-packages/tvm/relax/vm_build.py", line 147, in export_library
    return self.mod.export_library(
  File "/Users/wangxj/web-llm/venv/lib/python3.9/site-packages/tvm/runtime/module.py", line 595, in export_library
    return fcompile(file_name, files, **kwargs)
  File "/Users/wangxj/web-llm/venv/lib/python3.9/site-packages/tvm/contrib/emcc.py", line 59, in create_tvmjs_wasm
    libs += [find_lib_path("wasm_runtime.bc")[0]]
  File "/Users/wangxj/web-llm/venv/lib/python3.9/site-packages/tvm/_ffi/libinfo.py", line 152, in find_lib_path
    raise RuntimeError(message)
RuntimeError: Cannot find libraries: wasm_runtime.bc

jan-www avatar May 05 '23 12:05 jan-www

I met this issue on my Ubuntu 22 instance (I built the mlc-ai/relax from source), reason is the web wasm was not built, the script https://github.com/mlc-ai/relax/blob/mlc/tests/scripts/task_web_wasm.sh helps me fix it

yongwww avatar May 10 '23 22:05 yongwww