Open cancan101 opened 8 years ago
torch-ios has a version of torch self-contained. that code there is the version of torch that is compiled in to the iOS app.
Is the code modified from the original Torch7 code? Or this some way to use git-submodules here?
I think there are minor modifications. like how things are included.
@soumith does this mean that there updates that are excluded from the latest Torch distro when generating the iOS framework? How complex would it be to include this into the roadmap for Torch7? i.e. Ensure that the Torch7 for iOS is the same as that for Desktops. We should probably include support for Android as well (though my Java is a bit rusty).
@woffle One can basically auto-generate the iOS branch from the latest torch fork. The patches to build on iOS are minor.
The tricky but important parts are to override the require function: https://github.com/clementfarabet/torch-ios/blob/386d946c1a815eb7a1f6c47e8f81c6f6df847dd3/pkg/torch/init.lua#L2-L8 and include / torch.include: https://github.com/clementfarabet/torch-ios/blob/386d946c1a815eb7a1f6c47e8f81c6f6df847dd3/pkg/torch/init.lua#L33-L35
as well as having static compilation + pre-loading the C side libs like libtorch so that when they are required, they are already there.
I tried to do it, but there is a problem with directory 'wrap' in 'pkg'. In the last torch there is file 'torchcwrap.lua', what is its purpose and how to include it in torch-ios?
What is the point of the code in: https://github.com/clementfarabet/torch-ios/tree/ios/pkg/torch if Torch7 is required to be pre-installed?