-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm_cc_binary with tensorflow lite minimal example failed #1424
Comments
The error message is complaining about atomics, so maybe it needs to be built with threads. Try adding |
Thank you very much. Build completed successfully now |
I am using WebAssembly (Wasm) in a WeChat Mini Program environment, but it does not support Web Workers. worker=new Worker(pthreadMainJs,workerOptions) Would you like additional information or suggestions on how to handle WebAssembly in WeChat Mini Programs without Web Workers? @walkingeyerobot like without option thank you so much !~ |
Are you able to get tensorflow lite to compile without threads outside of bazel and run in your environment? If yes, I'm happy to help dig into this further. If no, I think that's a question for hte tensorflow lite folks. |
Thank you very much for your help. According to the advice from a TensorFlow Lite team member, I tried remove the -pthread lines in the emlink params file and ran generated |
This works internally in google3 (you can ping me in chat for a link) for building @tensorflow/tfjs-tflite, so I think the Bazel wasm tooling probably supports it. My guess is there's something misconfigured in the oss build, possibly before anything gets passed to wasm_cc_binary, that's causing it to use threads even when threads are not requested. If that's the case, then this is a TFLite issue. |
I found a solution to fix the |
tensorflow lite minimal example
tensorflow/tensorflow/lite/examples/minimal/BUILD:13:10: Linking tensorflow/lite/examples/minimal/minimal failed: (Exit 1): emcc_link.sh failed: error executing command (from target //tensorflow/lite/examples/minimal:minimal) external/emsdk/emscripten_toolchain/emcc_link.sh @bazel-out/wasm-opt-ST-b4dbd4a2bfc4/bin/tensorflow/lite/examples/minimal/minimal-2.params
wasm-ld: error: --shared-memory is disallowed by bazel-out/wasm-opt-ST-b4dbd4a2bfc4/bin/tensorflow/lite/examples/minimal/_objs/minimal/minimal.o because it was not compiled with 'atomics' or 'bulk-memory' features.
emcc: error: '/private/var/tmp/_bazel_yongle/fd2da45fc7b2786266a27e6e6c87cfd0/execroot/org_tensorflow/external/emscripten_bin_mac/bin/wasm-ld @/var/folders/sh/vmbfsw6x5fv2mn91h60r1jj00000gn/T/emscripten_qe8ad8zr.rsp.utf-8' failed (returned 1)
Target //tensorflow/lite/examples/minimal:wasm-minimal failed to build
The text was updated successfully, but these errors were encountered: