Closed MrJungle1 closed 1 year ago
Please checkout latest examples https://github.com/mlc-ai/web-llm/tree/main/examples
Hi @MrJungle1, there is another folk running into this issue: https://github.com/mlc-ai/web-llm/issues/263 on a Windows. Do you recall how you fixed it (or if you still reproduce the issue)?
I deploy and execute locally under Windows/ scripts/prep_ Deps.sh, error message displayed as follows:
$ ./scripts/prep_deps.sh
emcc --version emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.38 (9eff02bc816c50ab0e3b70a3bd5b72a8dc2893a2) Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt) This is free and open source software under the MIT license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
npm --version 9.5.1
TVM_HOME_SET=
[[ -z '' ]]
[[ ! -d 3rdparty/tvm ]]
echo 'Do not find TVM_HOME env variable, cloning a version as source.' Do not find TVM_HOME env variable, cloning a version as source.
git clone https://github.com/apache/tvm 3rdparty/tvm --branch unity --recursive Cloning into '3rdparty/tvm'... remote: Enumerating objects: 179527, done. remote: Counting objects: 100% (236/236), done. remote: Compressing objects: 100% (166/166), done. remote: Total 179527 (delta 109), reused 124 (delta 67), pack-reused 179291 Receiving objects: 100% (179527/179527), 87.31 MiB | 4.93 MiB/s, done. Resolving deltas: 100% (136965/136965), done. Updating files: 100% (5401/5401), done. Submodule '3rdparty/OpenCL-Headers' (https://github.com/KhronosGroup/OpenCL-Headers.git) registered for path '3rdparty/OpenCL-Headers' Submodule '3rdparty/cnpy' (https://github.com/rogersce/cnpy.git) registered for path '3rdparty/cnpy' Submodule '3rdparty/cutlass' (https://github.com/NVIDIA/cutlass.git) registered for path '3rdparty/cutlass' Submodule 'dlpack' (https://github.com/dmlc/dlpack.git) registered for path '3rdparty/dlpack' Submodule 'dmlc-core' (https://github.com/dmlc/dmlc-core.git) registered for path '3rdparty/dmlc-core' Submodule '3rdparty/libbacktrace' (https://github.com/tlc-pack/libbacktrace.git) registered for path '3rdparty/libbacktrace' Submodule '3rdparty/rang' (https://github.com/agauniyal/rang.git) registered for path '3rdparty/rang' Submodule '3rdparty/vta-hw' (https://github.com/apache/tvm-vta.git) registered for path '3rdparty/vta-hw' Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/OpenCL-Headers'... remote: Enumerating objects: 1276, done. remote: Counting objects: 100% (299/299), done. remote: Compressing objects: 100% (132/132), done. remote: Total 1276 (delta 245), reused 183 (delta 164), pack-reused 977 Receiving objects: 100% (1276/1276), 732.85 KiB | 5.20 MiB/s, done. Resolving deltas: 100% (829/829), done. Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/cnpy'... remote: Enumerating objects: 164, done. remote: Total 164 (delta 0), reused 0 (delta 0), pack-reused 164 Receiving objects: 100% (164/164), 52.32 KiB | 10.46 MiB/s, done. Resolving deltas: 100% (94/94), done. Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/cutlass'... remote: Enumerating objects: 20778, done. remote: Counting objects: 100% (824/824), done. remote: Compressing objects: 100% (460/460), done. remote: Total 20778 (delta 354), reused 791 (delta 346), pack-reused 19954
Receiving objects: 100% (20778/20778), 31.33 MiB | 4.86 MiB/s, done. Resolving deltas: 100% (15061/15061), done. Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dlpack'... remote: Enumerating objects: 462, done. remote: Counting objects: 100% (110/110), done. remote: Compressing objects: 100% (41/41), done. remote: Total 462 (delta 85), reused 79 (delta 69), pack-reused 352 Receiving objects: 100% (462/462), 1.70 MiB | 8.19 MiB/s, done. Resolving deltas: 100% (163/163), done. Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dmlc-core'... remote: Enumerating objects: 6294, done. remote: Counting objects: 100% (158/158), done. remote: Compressing objects: 100% (111/111), done. remote: Total 6294 (delta 67), reused 97 (delta 30), pack-reused 6136 Receiving objects: 100% (6294/6294), 1.68 MiB | 6.37 MiB/s, done. Resolving deltas: 100% (3813/3813), done. Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/libbacktrace'... remote: Enumerating objects: 459, done. remote: Counting objects: 100% (311/311), done. remote: Compressing objects: 100% (36/36), done. remote: Total 459 (delta 285), reused 275 (delta 275), pack-reused 148 Receiving objects: 100% (459/459), 1.03 MiB | 5.32 MiB/s, done. Resolving deltas: 100% (341/341), done. Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/rang'... remote: Enumerating objects: 735, done. remote: Counting objects: 100% (31/31), done. remote: Compressing objects: 100% (27/27), done. remote: Total 735 (delta 9), reused 15 (delta 3), pack-reused 704 Receiving objects: 100% (735/735), 265.43 KiB | 3.02 MiB/s, done. Resolving deltas: 100% (371/371), done. Cloning into 'C:/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/vta-hw'... remote: Enumerating objects: 3312, done. remote: Counting objects: 100% (328/328), done. remote: Compressing objects: 100% (137/137), done. remote: Total 3312 (delta 256), reused 191 (delta 191), pack-reused 2984 Receiving objects: 100% (3312/3312), 1.43 MiB | 1.04 MiB/s, done. Resolving deltas: 100% (1443/1443), done. Submodule path '3rdparty/OpenCL-Headers': checked out 'b590a6bfe034ea3a418b7b523e3490956bcb367a' Submodule path '3rdparty/cnpy': checked out '4e8810b1a8637695171ed346ce68f6984e585ef4' Submodule path '3rdparty/cutlass': checked out '92ebbf1dc4612bf838ace6f2e6d262919f0abd63' Submodule path '3rdparty/dlpack': checked out 'e2bdd3bee8cb6501558042633fa59144cc8b7f5f' Submodule path '3rdparty/dmlc-core': checked out '09511cf9fe5ff103900a5eafb50870dc84cc17c8' Submodule path '3rdparty/libbacktrace': checked out '08f7c7e69f8ea61a0c4151359bc8023be8e9217b' Submodule path '3rdparty/rang': checked out 'cabe04d6d6b05356fa8f9741704924788f0dd762' Submodule path '3rdparty/vta-hw': checked out '36a91576edf633479c78649e050f18dd2ddc8103'
export TVM_HOME=3rdparty/tvm
TVM_HOME=3rdparty/tvm
export SENTENCEPIECE_JS_HOME=3rdparty/sentencepiece-js
SENTENCEPIECE_JS_HOME=3rdparty/sentencepiece-js
mkdir -p dist
cd 3rdparty/tvm/web
make emcc -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dlpack/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dmlc-core/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/compiler-rt -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/picojson -O3 -std=c++17 -Wno-ignored-attributes -c -MM -MT dist/wasm/wasm_runtime.bc emcc/wasm_runtime.cc >dist/wasm/wasm_runtime.d emcc -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dlpack/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dmlc-core/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/compiler-rt -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/picojson -O3 -std=c++17 -Wno-ignored-attributes -emit-llvm -c -o dist/wasm/wasm_runtime.bc emcc/wasm_runtime.cc emcc/wasm_runtime.cc:32:10: fatal error: 'tvm/runtime/c_runtime_api.h' file not found
include <tvm/runtime/c_runtime_api.h>
1 error generated. emcc: error: 'C:/Users/klayychen/Desktop/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN --sysroot=C:\Users\klayychen\Desktop\emsdk\upstream\emscripten\cache\sysroot -Xclang -iwithsysroot/include\fakesdl -Xclang -iwithsysroot/include\compat -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dlpack/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/dmlc-core/include -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/compiler-rt -I/c/Users/klayychen/Desktop/web-llm/3rdparty/tvm/3rdparty/picojson -O3 -std=c++17 -Wno-ignored-attributes -emit-llvm -c emcc/wasm_runtime.cc -o dist/wasm/wasm_runtime.bc' failed (returned 1) Makefile:36: recipe for target 'dist/wasm/wasm_runtime.bc' failed make: *** [dist/wasm/wasm_runtime.bc] Error 1
git submodule update --init --recursive
cd 3rdparty/sentencepiece-js ./scripts/prep_deps.sh: line 23: cd: 3rdparty/sentencepiece-js: No such file or directory
git submodule update --init --recursive
rm -rf dist/sentencepiece
cp -r 3rdparty/sentencepiece-js/dist dist/sentencepiece cp: cannot stat '3rdparty/sentencepiece-js/dist': No such file or directory