Onnxruntime: Build an execution provider for Android based on NNAPI - integrating DNNLibrary into ONNX Runtime

Created on 26 Apr 2019  路  5Comments  路  Source: microsoft/onnxruntime

DNNLibrary, created by JDAI, is a DNN inference library based on Android NNAPI.

As discussed with @linkerzhang, ONNX Runtime and DNNLibrary will cooperate on Android. Through this cooperation, DNNLibrary will be able to be integrated into ONNX Runtime as an execution provider. The integration is targeted to be finished before the end of July.

This issue is opened to track the progress :)

  • [x] In DNNLibrary, load & run ONNX model directly instead of converting ONNX model to DNNLibrary's .daq format (This item will be done in DNNLibrary repo)

  • [x] Integrate DNNLibrary into ONNX Runtime as NNAPI execution provider (implement GetCapability and Compile, following the existing TensorRT Execution Provider) (PR: #1220)

  • [ ] Code review of NNAPI execution provider

  • [ ] Enable tests (including perf tests and unit tests) and fix failed tests

  • [ ] Code review of tests

enhancement

Most helpful comment

@RandyGaul

the NNAPI execution provider in a usable state (from C, no Java bindings necessary)?

Yes, just build onnx runtime with -Donnxruntime_USE_NNAPI=ON

All 5 comments

Thank you very much! @daquexian This is great! Let's make it.

Pin-ing this issue to track its progress. Thanks a lot!

Any status update on finishing this execution provider? I don't need Java bindings -- in my case my app is mostly native code, so I can access the ONNX Runtime C API directly.

  1. Is the NNAPI execution provider in a usable state (from C, no Java bindings necessary)?
  2. If not, is there a timeline I can see of when this will become usable?

@RandyGaul

the NNAPI execution provider in a usable state (from C, no Java bindings necessary)?

Yes, just build onnx runtime with -Donnxruntime_USE_NNAPI=ON

Closing this issue as the feature is complete and NN API is in preview. If anyone has further requests or feedback, please file another issue describing in detail.

Was this page helpful?
0 / 5 - 0 ratings