caffe2
caffe2 copied to clipboard
android lib libcaffe2.a is 627.6M, what is wrong?
the android lib libcaffe2.a
old version is 55M, the model run time is 10s in android. now the newest version is 627M, the same model run time is 20s.
what is wrong?
Assigning a few folks to take a look - possibly due to additional dependencies we introduced (such as ACL)?
(Also, it is possible it's due to the removal of "-s", cc @Maratyszcza
what build command did you use?
@jerryzh168
./scripts/build_android.sh
There were two separate issues which during the week that could have this effect: we accidentally disabled NEON in ARMv7 builds, and disabled stripping binaries. Both should we be fixed on master now.
@Maratyszcza
i get the newest code, but the new size of libcaffe2.a is 636.6M.
Because object files (.o) are not stripped, libcaffe2.a is just a collection of object files.
@freedomtan How to strip the .o files?
I meet the same problem, how can I stripe the libcaffe2.a?
@wguo1983: add strip
to build rule of .o maybe?
@dongwflj: you should strip .o before creating .a, I think
@freedomtan @dongwflj I fix it, delete the "-g" option in gcc in android-ndk "android.toolchain.cmake".
according to the following thread, you can also add this line into build_andoroid.sh
CMAKE_ARGS+=("-DCMAKE_CXX_FLAGS_RELEASE=-g0")
https://github.com/android-ndk/ndk/issues/243
@yamsam it is work, thank you!