-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Closed
Labels
Description
🚀 Feature
It would be nice to make it easier to build android libraries for caffe2.
Motivation
I recently built the AICamera example with recent android studio. The result and steps are here:
https://github.com/t-vi/AICamera/
Pitch
Based on the feedback I got on the first day after mentioning this on the PyTorch slack, there are more people who have been trying this and had less success, even though I'd think they're pretty good with PyTorch in general.
- To facilitate android x86 building, add a switch to disable AVX independent of detection.
(Or make it work on android, but I guess android x86 is debugging mostly anyway.) - Make the build output path include the architecture.
- Default to clang to adapt to what android seems to be doing toolchain-wise.
- Add some instructions to build and copy the libs + includes.
Alternatives
- Keep it a secret black art and find a business model helping people on a case by case basis.
- Build libtorch for android and use that.
Additional context
The other changes in my fork might be the basis for a PR for the AICamera repo and an update to the tutorial once this is merged.
Needless to say, I would submit the PR.
ptrblck, fmassa, RicCu, gesas, infil00p and 8 more