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
hubin858130 opened this issue
Mar 4, 2024
· 1 comment
Labels
model:transformerissues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc.platform:mobileissues related to ONNX Runtime mobile; typically submitted using template
The inswapper_128. onnx model of Insightface can be successfully run on MacOS using the Python library, and also on Mac OS using onnxruntime c++1.17.0 version. But on Android 11 and Android 13, multiple phones have failed to run, and an error was reported when creating a new session. The specific error is:
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x742e534b7c in tid 15185 (Thread-2), pid 15155 (tern.inswapdemo)
Cmdline: com.lantern.inswapdemo
pid: 15155, tid: 15185, name: Thread-2 >>> com.lantern.inswapdemo <<< #9 pc 0000000000ca8418 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #10 pc 0000000000c9c3cc /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #11 pc 0000000000c9bb10 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #12 pc 0000000000449c98 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #13 pc 00000000004480ac /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #14 pc 000000000044a800 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #15 pc 000000000042dd90 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #16 pc 000000000042d9c0 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823) #17 pc 00000000001a7810 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libinswapface.so (Ort::Session::Session(Ort::Env const&, char const*, Ort::SessionOptions const&)+100) (BuildId: 2487feab461a4bbf467d05ce0f982f844831a613)
I encountered the same error when converting the model to FP16 using float16. The onnxruntime versions for Android are 1.16.3, 1.17.0, and 1.17.1, and they all crash.
Additionally, I found that using onnxruntime-android-1.17.0.aar can load the onnx model. But when i unzip the aar file , load library onnxruntime.so and write Jni myself, it always crashes.
Sorry,I have discovered a definition that may cause stack overflow, in the .h file,I defined float[512][512],when i removed this 2 dims array,onnxruntime could load the onnx file.
Ok,I will close this issuse!
model:transformerissues related to a transformer model: BERT, GPT2, Hugging Face, Longformer, T5, etc.platform:mobileissues related to ONNX Runtime mobile; typically submitted using template
Describe the issue
The inswapper_128. onnx model of Insightface can be successfully run on MacOS using the Python library, and also on Mac OS using onnxruntime c++1.17.0 version. But on Android 11 and Android 13, multiple phones have failed to run, and an error was reported when creating a new session. The specific error is:
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x742e534b7c in tid 15185 (Thread-2), pid 15155 (tern.inswapdemo)
Cmdline: com.lantern.inswapdemo
pid: 15155, tid: 15185, name: Thread-2 >>> com.lantern.inswapdemo <<<
#9 pc 0000000000ca8418 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#10 pc 0000000000c9c3cc /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#11 pc 0000000000c9bb10 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#12 pc 0000000000449c98 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#13 pc 00000000004480ac /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#14 pc 000000000044a800 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#15 pc 000000000042dd90 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#16 pc 000000000042d9c0 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libonnxruntime.so (BuildId: d6de1672c0b55de5c0fcb82f99789ac38faa2823)
#17 pc 00000000001a7810 /data/app/~~9ObP6OPYprJdNxgoP2LQnQ==/com.lantern.inswapdemo-AUa6PQFIG3ek8Kd8v4B_YQ==/base.apk!libinswapface.so (Ort::Session::Session(Ort::Env const&, char const*, Ort::SessionOptions const&)+100) (BuildId: 2487feab461a4bbf467d05ce0f982f844831a613)
I encountered the same error when converting the model to FP16 using float16. The onnxruntime versions for Android are 1.16.3, 1.17.0, and 1.17.1, and they all crash.
Additionally, I found that using onnxruntime-android-1.17.0.aar can load the onnx model. But when i unzip the aar file , load library onnxruntime.so and write Jni myself, it always crashes.
To reproduce
code:
const char* modelpath = "/sdcard/inswapper_128.onnx";
Env env = Env(ORT_LOGGING_LEVEL_INFO, "inswp");
Ort::Session *ort_session = nullptr;
SessionOptions sessionOptions = SessionOptions();
sessionOptions.SetGraphOptimizationLevel(ORT_ENABLE_ALL);
ort_session = new Session(env, modelpath, sessionOptions);
model:
https://huggingface.co/ezioruan/inswapper_128.onnx/blob/main/inswapper_128.onnx
android onnxruntime:
https://mvnrepository.com/artifact/com.microsoft.onnxruntime/onnxruntime-android
Urgency
No response
Platform
Android
OS Version
11、12、13
ONNX Runtime Installation
Released Package
Compiler Version (if 'Built from Source')
No response
Package Name (if 'Released Package')
onnxruntime-android
ONNX Runtime Version or Commit ID
1.16.3、1.17.0、1.17/1
ONNX Runtime API
C++/C
Architecture
X64
Execution Provider
Other / Unknown
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: