finds.dev← search

// the find

soumith/torch-android

★ 276 · CMake · BSD-3-Clause · updated Jan 2017

Torch-7 for Android

A 2017-era fork of Torch7 cross-compiled for Android via NDK/CMake, with a custom Lua package loader so scripts and models can be loaded straight out of the APK assets folder. Useful only as a historical reference for anyone doing on-device Lua/Torch inference, not as something you'd actually adopt today.

The APK asset loader (torchandroid.cpp) is a genuinely clean bit of engineering - overriding Lua's package.loaders to pull modules directly from the APK, plus apkbinary32/apkbinary64/apkascii load modes for torch.load, solves a real packaging problem for shipping models inside an app. Three working demo apps (basic Lua console, CIFAR-10 camera classifier, a contributed face detector) prove the toolchain actually produces runnable APKs, not just library code that compiles. The CMake Android toolchain file and NEON build script show real cross-compilation work was done and benchmarked on actual hardware (Nexus 5 benchmark file included).

Dead: last push January 2017, and Torch7/Lua itself has been fully superseded by PyTorch (built by the same author) - there is no reason to build new work on this stack. Build depends on discontinued NVIDIA CodeWorks for Android and a specific NDK point release (r13b) with documented compatibility bugs between CodeWorks' bundled NDK and the one you need for NEON; this will not build cleanly on any current toolchain without real archaeology. Heavy git submodule dependency chain (libjpeg-turbo, libpng, distro) with no CI to verify any of it still resolves or builds. No tests, and license clarity is murky - separate LICENSE files scattered per-demo rather than one clear top-level grant for the whole toolchain.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →