facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

Where are the binaries for android? #939

Open xhsoldier opened 7 years ago

xhsoldier commented 7 years ago

I built caffe2 for android by this: ./scripts/build_android.sh but where is the generated binaries?

libCAFFE2_NNPACK.a or libCAFFE2_PTHREADPOOL.a or libCaffe2_CPU.a? libCAFFE2_NNPACK.a is 328kb libCAFFE2_PTHREADPOOL.a is 8kb libCaffe2_CPU.a is 304M

For example, the AICamera example: https://github.com/bwasti/AICamera/ Caffe2 binaries used by AICamera, I can not generate these libraries.

odol0503 commented 7 years ago

You may check #339.

xhsoldier commented 7 years ago

I do not think these two question are the same. #339 is android build optimization, I built successful, but I can not find the output binaries used by AICamera.

odol0503 commented 7 years ago

libCaffe2_CPU.a is caffe2's main library. But it is not optimized. If you set -O3 option, you can get about 40MB caffe2 library. And if you exclude some OPs you don't need, you can get a smaller size caffe2 library.

odol0503 commented 7 years ago

I think it is good to use the stable version like v0.7.0 not the latest version.

thx

2017-07-19 17:26 GMT+09:00 Xu Hai notifications@github.com:

when I user libCaffe2_CPU.a in android studio project, I get this error: Error:error: undefined reference to 'caffe2::EnforceNotMet::EnforceNotMet(char const, int, char const, std::string const&)'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/caffe2/caffe2/issues/939#issuecomment-316311350, or mute the thread https://github.com/notifications/unsubscribe-auth/AIoMtTynooCIfEv3I7JO9xr5sD52jq7Aks5sPb2ugaJpZM4ObAtb .

moli232777144 commented 7 years ago

which API?API19 can you compile success?

odol0503 commented 7 years ago

I meant caffe2 branch or tag. there is a caffe2 v0.7.0 tag.

thx

2017-07-20 10:04 GMT+09:00 moli232777144 notifications@github.com:

which API?API19 can you compile success?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/caffe2/caffe2/issues/939#issuecomment-316566459, or mute the thread https://github.com/notifications/unsubscribe-auth/AIoMtcpgBPfoXsyi1buHMgrzrpODYv7qks5sPqebgaJpZM4ObAtb .

tiancaishaonvjituizi commented 7 years ago

@odol0503 Could you tell me why v0.7.0 is better?

odol0503 commented 7 years ago

caffe2 v0.7.0 is official version, although caffe2 v1.0 is not released yet. To avoid meeting unexpected issues, it is recommended to use official version.

thx

jingziyou commented 7 years ago

I have the same question,only use libCaffe2_CPU.a in my android project?

odol0503 commented 7 years ago

Sorry, I don't catch what you mean. If you mean you can use only libCaffe2_CPU.a library, it can you use it alone or linking with other libraries like NNPACK.

Maratyszcza commented 7 years ago

cc @bwasti