Onnxruntime: NNAPI build doesn't provide libonnxruntime library

Created on 19 Jul 2020  路  4Comments  路  Source: microsoft/onnxruntime

Hello.
After building the library according to the instructions, I got a set of.a files in the onnxruntime/build/Linux/Debug/ folder(the list is given below).
onnx/libonnx.a onnx/libonnx_proto.a libonnxruntime_common.a libonnxruntime_framework.a libonnxruntime_graph.a libonnxruntime_mlas.a libonnxruntime_optimizer.a libonnxruntime_providers.a libonnxruntime_providers_nnapi.a libonnxruntime_session.a libonnxruntime_test_utils.a libonnxruntime_util.a libonnx_test_data_proto.a libonnx_test_runner_common.a
The C++ examples shows that developers need to use onnxruntime library, but I don't have it. Please tell me what I should specify in CMakeLists.txt to build my application?

Urgency
none

System information

  • OS Linux Ubuntu 20.04
  • ONNX Runtime installed from source
  • ONNX Runtime version from GIT
  • GCC version 9.3.0

To Reproduce

  • Build onnxruntime with command
    ./build.sh --android --android_sdk_path <android sdk path> --android_ndk_path <android ndk path> --use_dnnlibrary

Expected behavior
Build folder contains an onnxruntime library or library provide CMakeLists.txt example.

support

All 4 comments

Please append "--build_shared_lib" to the build comand

Please append "--build_shared_lib" to the build comand

Thanks for flag. The library was assembled correctly, but what should I do next? Could you help me with execution provider?
string log_id = "Foo"; auto logging_manager = std::make_unique<LoggingManager> (std::unique_ptr<ISink>{new CLogSink{}}, static_cast<Severity>(lm_info.default_warning_level), false, LoggingManager::InstanceType::Default, &log_id) Environment::Create(std::move(logging_manager), env) InferenceSession session_object{so,env}; session_object.RegisterExecutionProvider(std::make_unique<::onnxruntime::NnapiExecutionProvider>()); status = session_object.Load(model_file_name);

Unfortunatiely, I there are no LoggingManager and NnapiExecutionProvider in includes folder, but if I use headers from onnxruntime internal sources compiler writes errors like:
fatal error: 'core/framework/execution_provider.h' file not found
or
/home/user/ML/Android/onnxruntime/include/onnxruntime/core/common/logging/logging.h:14:10: fatal error: 'core/common/common.h' file not found

Thanks for your help.

Now, it is working and give 9x speedup on squeezenet. Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Exlsunshine picture Exlsunshine  路  4Comments

addisonklinke picture addisonklinke  路  3Comments

fdwr picture fdwr  路  4Comments

walbermr picture walbermr  路  3Comments

vera121 picture vera121  路  3Comments