From: Ondřej Čertík Date: Sun, 25 Feb 2024 13:57:04 +0000 (-0700) Subject: mnist : fix the emcc command to compile correctly (#746) X-Git-Tag: upstream/0.0.1642~915 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=f8e262f4391c9eb55b32b34a9021db1d66d858fe;p=pkg%2Fggml%2Fsources%2Fggml mnist : fix the emcc command to compile correctly (#746) Otherwise we get linking errors: wasm-ld: error: /var/folders/8w/5mqfkhqn1nj0tw97g3hl1nyh0000gn/T/emscripten_temp_hj657tq4/ggml_0.o: undefined symbol: dequantize_row_q4_0 wasm-ld: error: /var/folders/8w/5mqfkhqn1nj0tw97g3hl1nyh0000gn/T/emscripten_temp_hj657tq4/ggml_0.o: undefined symbol: quantize_row_q4_0 ... --- diff --git a/examples/mnist/README.md b/examples/mnist/README.md index 32e949d4..cf3f8d0d 100644 --- a/examples/mnist/README.md +++ b/examples/mnist/README.md @@ -127,7 +127,7 @@ The example can be compiled with Emscripten like this: ```bash cd examples/mnist -emcc -I../../include -I../../include/ggml -I../../examples ../../src/ggml.c main.cpp -o web/mnist.js -s EXPORTED_FUNCTIONS='["_wasm_eval","_wasm_random_digit","_malloc","_free"]' -s EXPORTED_RUNTIME_METHODS='["ccall"]' -s ALLOW_MEMORY_GROWTH=1 --preload-file models/mnist +emcc -I../../include -I../../include/ggml -I../../examples ../../src/ggml.c ../../src/ggml-quants.c main.cpp -o web/mnist.js -s EXPORTED_FUNCTIONS='["_wasm_eval","_wasm_random_digit","_malloc","_free"]' -s EXPORTED_RUNTIME_METHODS='["ccall"]' -s ALLOW_MEMORY_GROWTH=1 --preload-file models/mnist ``` Online demo: https://mnist.ggerganov.com