[tflite] Uncaught RuntimeError: Aborted(). Build with -s ASSERTIONS=1 for more info.
See original GitHub issueI get the error in the title of this issue (with no other explanation) when loading this tflite file with tflite.loadTFLiteModel
. The tflite file was generated from this SavedModel. The SavedModel can be loaded and inferenced without any errors, and the results are correct.
The SavedModel was converted to tflite with TensorFlow version 2.8.0
. You can see the versions of the tfjs files that I used in the code below.
Minimal replication:
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core@3.16.0/dist/tf-core.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-cpu@3.16.0/dist/tf-backend-cpu.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-tflite@0.0.1-alpha.8/dist/tf-tflite.min.js"></script>
<script type="module">
let tfliteModel = await tflite.loadTFLiteModel('https://huggingface.co/rocca/lit-web/resolve/main/debug/lit_savedmodel_no_params.tflite');
</script>
You can click this link and then open the browser console: https://jsbin.com/melekuxena/edit?html,output Note that the tflite file is ~120mb, so it might take a minute or so to download depending on your connection speed.
Full error:
Uncaught RuntimeError: Aborted(). Build with -s ASSERTIONS=1 for more info.
at abort (tflite_web_api_cc_simd.js:9:9277)
at _abort (tflite_web_api_cc_simd.js:9:59963)
at tflite_web_api_cc_simd.wasm:0x3501
at tflite_web_api_cc_simd.wasm:0x8a9f3
at tflite_web_api_cc_simd.wasm:0x210c13
at tflite_web_api_cc_simd.wasm:0x1075aa
at tflite_web_api_cc_simd.wasm:0x11331
at tflite_web_api_cc_simd.wasm:0x8ce44
at tflite_web_api_cc_simd.wasm:0x8c9c7
at tflite_web_api_cc_simd.wasm:0x8c696
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
s ASSERTIONS=1 for more info and Uncaught abort(101 ...
This error occurs about every 10th time and is gone after a page refresh. HSR-QUEST.js:7 Uncaught abort(101). Build with -s ASSERTIONS=1 for ...
Read more >Tfjs-tflite load custom converted model, dlopen error
RuntimeError : abort(To use dlopen, you need to use Emscripten's linking support, ... Build with -s ASSERTIONS=1 for more info.
Read more >How to debug a "native code called abort()" issue in ... - Reddit
I'm trying to build a toy project using FTXUI and really want to get webassembly builds working. The project itself has a webassembly ......
Read more >To use dlopen, you need to use Emscripten's linking support
See your browser JavaScript console for more info. ... If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more ......
Read more >tf.lite.Interpreter | TensorFlow v2.11.0
Use get_signature_runner() for a more user-friendly inference API. ... which corresponds to tflite::ops::builtin::BuiltinOpResolver in C++.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s a very good point. I will need to spend some time looking into the source code and see how this thing works. For now, as you said, looks like some info in the model kind of determines whether the threaded version of the op/kernel will be used or not. Will investigate more. Thank you!
@jinjingforever Ahh, easy fix - thanks! I’ve used this little service worker trick to get it working on Github Pages (which doesn’t allow setting COOP/COEP headers). And thanks for providing that debug build! It’ll come in handy for future debugging.
But also: This seems like a bug - i.e. it shouldn’t be automatically loading a non-threaded version of the runtime if threads aren’t available? Or is the
.tflite
file somehow specifying that threads are a hard requirement for that op?