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

how to compile libHalide.so for android armv8a #3296

Open
chenjp1998 opened this issue Sep 29, 2018 · 4 comments
Open

how to compile libHalide.so for android armv8a #3296

chenjp1998 opened this issue Sep 29, 2018 · 4 comments

Comments

@chenjp1998
Copy link

by default, libHalide.so is for x86_64,but we want to compile it for android armv8a,
how to do it?

@abadams
Copy link
Member

abadams commented Sep 30, 2018

First note that you only need to compile libHalide for armv8 if you want to use JIT-compilation on an arm device, which is not a common use case. More likely you want to use AOT compilation, which means that you only compile libHalide.so on x86, and then cross-compile by setting the Halide target appropriately (see the tutorial on generators).

If you do want to JIT on arm, then the usual build procedure should work equally well on arm and x86. We have arm buildbots that run linux, and I compile Halide on it the same way as I do on my linux x86 machine. This is the procedure in the README.

@chenjp1998
Copy link
Author

thanks for your reply,
i am porting hdr-plus to android arm64-v8a,and get libHalide.so from halide-arm64-linux-64-trunk-aa5d5514f179bf0ffe1a2dead0c0eb7300b4069a.tgz,but when run it,error occurs as following:
HydrogenONE:/ # hdrplus
hdrplus
WARNING: linker: "/system/lib64/libHalide.so" unused DT entry: type 0x6ffffef6 arg 0x4eed00
WARNING: linker: "/system/lib64/libHalide.so" unused DT entry: type 0x6ffffef7 arg 0x2d69fd8
CANNOT LINK EXECUTABLE "hdrplus": "/system/lib64/libHalide.so" has text relocations
Aborted
So i want to compile a libHalide.so for android arm64-v8a,but i don't know how to compile it on ubuntu x86-64 computer.With JIT-comilation?can you give me a sample CMakeLists.txt?

@chenjp1998
Copy link
Author

chenjp1998 commented Oct 8, 2018 via email

@hg-wang2015
Copy link

by default, libHalide.so is for x86_64,but we want to compile it for android armv8a,
how to do it?

I also want to compile libHalide.so for android, so did you fix this problem? Could you show me one example CMakeLists.txt if you successed.

ck3d pushed a commit to ck3d/nixpkgs that referenced this issue Sep 30, 2019
ARM platforms are currently not supported by Halide:

halide/Halide#3296
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

No branches or pull requests

3 participants