Currently, I try to export static android system-lib model. I set target to
target = 'opencl -device=mali --system-lib'
target_host = 'llvm -device=arm_cpu -mtriple=arm64-linux-android --system-lib'
and I export by
lib.export_library('model.tar', ndk.create_shared) # come from tvm.contrib.ndk
it doesn’t work as expect. I can export model, but cannot load and run on android device. I suspect that it because ndk.create_shared
is use only to export share library, because I see the code from here. it try to specific ["-shared", "-fPIC", "-lm"]
How can I fix this to export android model with static library.
Thank you!!
P.S. it will work if I set target without --system-lib
and export to .so
file, but I want to export as tar
, so I can use .o
file in that tar