Skip to content
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

[APP] Android RPC #359

Merged
merged 10 commits into from
Aug 25, 2017
Merged

[APP] Android RPC #359

merged 10 commits into from
Aug 25, 2017

Conversation

yzhliu
Copy link
Member

@yzhliu yzhliu commented Aug 20, 2017

  • Build android JNI automatically
  • OpenCL support & test
  • Build & sign .apk
  • Generate android .o & .so in python (seems that we can simply re-use tvm.contrib.cc.create_shared)
  • reconnect when rpc session ends
  • android rpc UT & Instrumentation test (integration test by apps/android_rpc/tests/android_rpc_test.py)

connected

error

Tested on my Redmi 4X Android Phone:
Processor: AArch64 Processor rev 4 (aarch64)
GLES: Qualcomm, Adreno (TM) 505, OpenGL ES 3.1 V@145.0 (GIT@Iebe23be877)

$ python3 android_rpc_test.py 
TVM: Initializing cython mode...
[00:38:20] src/codegen/llvm/codegen_llvm.cc:75: set native vector to be 32 for target aarch64
[00:38:20] src/runtime/opencl/opencl_device_api.cc:194: Initialize OpenCL platform 'Apple'
[00:38:20] src/runtime/opencl/opencl_device_api.cc:214: opencl(0)='Iris' cl_device_id=0x1024500
[00:38:21] src/codegen/llvm/codegen_llvm.cc:75: set native vector to be 32 for target aarch64
Run GPU test ...
0.000150427 secs/op
Run CPU test ...
0.000331302 secs/op

@@ -0,0 +1,15 @@
<resources>
<string name="app_name">TVM Rpc</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rpc->RPC

@@ -7,7 +7,8 @@
def create_shared(output,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is easier to create a ndk.py to do the actual cross compile to android? We can bundle quite a lot of things into it, like default compiler search.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I created one. forgot to commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since there is not too much reuse, maybe it is simpler to put the logics in ndk.py and not call create_shared here

@yzhliu
Copy link
Member Author

yzhliu commented Aug 24, 2017

@tqchen Ready to merge.
I'll provide documents in another PR (and java runtime documents)

objects : list
List of object files.

options : str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List of str, optional

@tqchen tqchen merged commit 0ee68d7 into apache:master Aug 25, 2017
vinx13 pushed a commit to vinx13/tvm that referenced this pull request Mar 9, 2022

Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
junrushao pushed a commit to junrushao/tvm that referenced this pull request Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants