diff options
Diffstat (limited to 'tensorflow/contrib/makefile/README.md')
-rw-r--r-- | tensorflow/contrib/makefile/README.md | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/tensorflow/contrib/makefile/README.md b/tensorflow/contrib/makefile/README.md index 65bd60c12a..715eb51577 100644 --- a/tensorflow/contrib/makefile/README.md +++ b/tensorflow/contrib/makefile/README.md @@ -174,26 +174,10 @@ tensorflow/contrib/makefile/build_all_ios.sh This process will take around twenty minutes on a modern MacBook Pro. -When it completes, you will have a unified library for all architectures -(i386sim, x86_64sim, armv7, armv7s and arm64) and the benchmark program. -Although successfully compiling the benchmark program is a +When it completes, you will have a library for a single architecture and the +benchmark program. Although successfully compiling the benchmark program is a sign of success, the program is not a complete iOS app. -If you would only like to build only one architecture to save time: -(iOS 11+ only supports 64bit so you can get away with arm64) - -```bash -tensorflow/contrib/makefile/build_all_ios.sh -a arm64 -``` - -After the first build if you would like to just build the tensorflow -library you can pass the -T flag to avoid a clean & rebuild. This should -take you just a few seconds to generate the library if you modified one file. - -```bash -tensorflow/contrib/makefile/build_all_ios.sh -a arm64 -T -``` - To see TensorFlow running on iOS, the example Xcode project in [tensorflow/examples/ios](../../examples/ios/) shows how to use the static library in a simple app. @@ -209,18 +193,19 @@ If you have not already, you will need to download dependencies: tensorflow/contrib/makefile/download_dependencies.sh ``` -Next, you will need to compile protobufs for iOS (optionally takes the -a $ARCH flag): +Next, you will need to compile protobufs for iOS: ```bash -tensorflow/contrib/makefile/compile_ios_protobuf.sh +tensorflow/contrib/makefile/compile_ios_protobuf.sh ``` -Then, you will need to compile the nsync library for iOS (optionally takes -a $ARCH flag): +Then, you will need to compile the nsync library for iOS: ```bash export HOST_NSYNC_LIB=`tensorflow/contrib/makefile/compile_nsync.sh` export TARGET_NSYNC_LIB=`tensorflow/contrib/makefile/compile_nsync.sh -t ios` ``` + Then, you can run the makefile specifying iOS as the target, along with the architecture you want to build for: @@ -234,6 +219,10 @@ This creates a library in `tensorflow/contrib/makefile/gen/lib/libtensorflow-core.a` that you can link any xcode project against. +At this point, you will have a library for a single architecture and the +benchmark program. Although successfully compiling the benchmark program is a +sign of success, the program is not a complete iOS app. + To see TensorFlow running on iOS, the example Xcode project in [tensorflow/examples/ios](../../examples/ios/) shows how to use the static library in a simple app. @@ -248,14 +237,6 @@ time follow it with: compile_ios_tensorflow.sh ``` -`compile_ios_tensorflow.sh` takes the -a flag to build only for one architecture. -In case you run into issues with unresolved symbols with nsync you can also pass --h ${HOST_NSYNC_LIB} and -n {TARGET_NSYNC_LIB} so it would look like: - -```bash -tensorflow/contrib/makefile/compile_ios_tensorflow.sh -f "-O3" -h tensorflow/contrib/makefile/downloads/nsync/builds/default.macos.c++11/nsync.a -n tensorflow/contrib/makefile/downloads/nsync/builds/lipo.ios.c++11/nsync.a -a arm64 -``` - In XCode, you will need to use -force_load in the linker flags section of the build settings to pull in the global constructors that are used to register ops and kernels. @@ -268,7 +249,7 @@ debug mode. If you are concerned about performance or are working on a release build, you would likely want a higher optimization setting, like so: ```bash -compile_ios_tensorflow.sh -f "-Os" +compile_ios_tensorflow.sh "-Os" ``` For other variations of valid optimization flags, see [clang optimization levels](http://stackoverflow.com/questions/15548023/clang-optimization-levels). |