-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Mobile] CreatMemoryInfo Failure in Android when try to create Ort::Value #21097
Comments
Any help would be greatly appreciated. )x0 |
I've already tried manually initialize ortAPI, by: #define ORT_API_MANUAL_INIT
......
OrtSD_Context::OrtSD_Context(const OrtSD_Config& ort_config_){
#ifdef ORT_API_MANUAL_INIT
Ort::InitApi(OrtGetApiBase()->GetApi(ORT_API_VERSION));
#endif
......
Tensor empty_test = TensorHelper::create(TensorShape{0}, std::vector<float>{});
} but seems not the reason for current trouble... also failed at TensorHelper::create, which is an encapsulation method for: Tensor result_tensor_ = Tensor::CreateTensor<T>(
Ort::MemoryInfo::CreateCpu(
OrtAllocatorType::OrtArenaAllocator, OrtMemType::OrtMemTypeDefault
), result_data_, input_size_,
shape_.data(), shape_.size()
); same error message occur at : Ort::MemoryInfo::CreateCpu(OrtAllocatorType::OrtArenaAllocator, OrtMemType::OrtMemTypeDefault) |
the ort-sd submodule CMakeLists.txt at here: |
The ORT headers aren't dynamically generated AFAIK, but you should always use the headers from the package with the ORT library to ensure they match. |
If I want to generate the onnxruntime library locally, where can I get the headers? |
Describe the issue
When running the ONNXRuntime on an Android device, a segmentation fault occurs with the following stack trace:
seems it caused by Ort::MemoryInfo::CreateCpu(OrtAllocatorType, OrtMemType) method fail.
I'm using libonnxruntime.so directly in native-cpp android lib, by link with ort-sd.a, which created from below project:
https://github.com/Windsander/CFDI-StableDiffusionONNXFast.git
and using cross compile in Android-native project with cmakelists.txt like this:
really needs some help to resolve this issue 0x0
the libonnxruntime.so comes from official 1.18.0-mobile:
https://mvnrepository.com/artifact/com.microsoft.onnxruntime/onnxruntime-android
in .arr/jni dir
To reproduce
https://github.com/Windsander/CFDI-StableDiffusionONNXFast.git
Urgency
No response
Platform
Android
OS Version
1.18.0
ONNX Runtime Installation
Released Package
Compiler Version (if 'Built from Source')
No response
Package Name (if 'Released Package')
None
ONNX Runtime Version or Commit ID
1.18.0-release
ONNX Runtime API
C++/C
Architecture
ARM64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: