You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS Platform and Distribution: Linux 4.4.0-17134-Microsoft swig command not found #706-Microsoft x86_64 GNU/Linux (Ubuntu 1804)
Mobile device: Android, arm64
TensorFlow installed from (source or binary): source and binary
TensorFlow version: 1.13.1
Bazel version: 0.24.1
GCC/Compiler version: NDK r18, clang
Describe the problem
Using the 'official' implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly', I tried
opt.setAllowBufferHandleOutput(true)
I get
E/aoyi.run.tflit: No implementation found for void org.tensorflow.lite.NativeInterpreterWrapper.allowBufferHandleOutput(long, boolean) (tried Java_org_tensorflow_lite_NativeInterpreterWrapper_allowBufferHandleOutput and Java_org_tensorflow_lite_NativeInterpreterWrapper_allowBufferHandleOutput__JZ)
Same error reproduced when I build the libtensorflowlite_jni.so locally with bazel.
Provide the exact sequence of commands / steps that you executed before running into the problem
To verify that this was a build issue, I run
> nm -D jniLibs/arm64-v8a/libtensorflowlite_jni.so | grep allow
0000000000010940 T Java_org_tensorflow_lite_NativeInterpreterWrapper_allowFp16PrecisionForFp32
The easy fix (tested here) is to tag the exported JNI functions as extern "C" in the .cc file. Relying on the header file is not necessary and (as we witness) error-prone.
The text was updated successfully, but these errors were encountered:
fixing [UnsatisfiedLinkError: No implementation found for void org.tensorflow.lite.NativeInterpreterWrapper.allowBufferHandleOutput(long, boolean)](tensorflow#28335).
System information
Describe the problem
Using the 'official'
implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
, I triedI get
Same error reproduced when I build the libtensorflowlite_jni.so locally with bazel.
Provide the exact sequence of commands / steps that you executed before running into the problem
To verify that this was a build issue, I run
Analysis
The root cause is that the build relies on nativeinterpreterwrapper_jni.h to declare the JNI functions as
extern "C"
.Java_org_tensorflow_lite_NativeInterpreterWrapper_allowBufferHandleOutput
was introduced in 18 Dec 2018 commit which did not update the.h
file.Proposed fix
The easy fix (tested here) is to tag the exported JNI functions as
extern "C"
in the.cc
file. Relying on the header file is not necessary and (as we witness) error-prone.The text was updated successfully, but these errors were encountered: