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
[WIP] add DJL Android ONNXRuntime support #1844
[WIP] add DJL Android ONNXRuntime support #1844
Conversation
android/core/build.gradle
Outdated
@@ -97,11 +97,19 @@ afterEvaluate { | |||
} | |||
} | |||
|
|||
repositories { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed
android/onnxruntime-native/README.md
Outdated
@@ -0,0 +1,90 @@ | |||
|
|||
# ONNXRuntime Android Build Procedure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the installation instruction is generally applicable to all versions. You can migrate the build instruction to Android folder and refer a link from README
|
||
|
||
|
||
//apply plugin: 'java-library' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the setup for transient onnxruntime, @frankfliu what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try my PR: #1866
Your android project should be able to simply include:
implementation "ai.djl.android:onnxruntime:0.19.0-SNAPSHOT"
Codecov Report
@@ Coverage Diff @@
## master #1844 +/- ##
============================================
- Coverage 72.08% 69.58% -2.51%
- Complexity 5126 5511 +385
============================================
Files 473 526 +53
Lines 21970 24445 +2475
Branches 2351 2665 +314
============================================
+ Hits 15838 17010 +1172
- Misses 4925 6124 +1199
- Partials 1207 1311 +104
Continue to review full report at Codecov.
|
android/onnxruntime-native/README.md
Outdated
|
||
# ONNXRuntime Android Build Procedure | ||
|
||
This procedure is meant only for developers who want to build PyTorch native binaries from source, this is not intended for regular users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is copied from PyTorch module, we need write different one for ONNX
android/build.gradle
Outdated
@@ -7,6 +7,7 @@ buildscript { | |||
|
|||
dependencies { | |||
classpath 'com.android.tools.build:gradle:4.2.2' | |||
classpath 'com.github.kezong:fat-aar:1.3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fat-aar may not work as you expected.
engine.jar bundle in aar won't work, it need to be dexed first.
I think we should just publish a pom only package as normal java project.
android/core/build.gradle
Outdated
@@ -97,11 +97,19 @@ afterEvaluate { | |||
} | |||
} | |||
|
|||
repositories { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not need this.
We can use mavenLocal():
- cd onnxruntime-native
- gradle pTML
As discussed offline. Let's just rollback to the previous trasient dependency version |
8ba0f0e
to
fc00a00
Compare
Change-Id: Ifc66c565a44519e2469c87d8e22ebd8b027bf660
fc00a00
to
c233bf5
Compare
* add DJL Android ONNXRuntime support * Use transient dependency Change-Id: Ifc66c565a44519e2469c87d8e22ebd8b027bf660 Co-authored-by: wuxuemeng <wxmcreate@foxmail.com> Co-authored-by: Frank Liu <frankfliu2000@gmail.com>
Description
Brief description of what this PR is about