Skip to content

Initial iOS Support and Example - #1631

Closed
petewarden wants to merge 26 commits into
tensorflow:masterfrom
petewarden:master
Closed

petewarden wants to merge 26 commits into
tensorflow:masterfrom
petewarden:master

Conversation

@petewarden

Copy link
Copy Markdown
Contributor

Compiling this will require the top-of-tree version of Bazel, until it makes it into the released version in about a week.

To compile the iOS example, run the following command:
bazel build -c opt -s //tensorflow/examples/ios:ios-app-binary-cc --ios_sdk_version=9.2 --ios_cpu="arm64"

You will need to put your mobile provisioning certificate in tools/objc/default_provisioning_profile.mobileprovision, and the Inception v3 model file and labels in a data directory inside tensorflow/examples/ios/data, e.g.
ls tensorflow/examples/ios/data/
grace_hopper.jpg imagenet_comp_graph_label_strings.txt tensorflow_inception_graph.pb

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

@@ -0,0 +1,68 @@
# Description:
# Tensorflow camera demo app for Android.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for iOS?

@petewarden

Copy link
Copy Markdown
Contributor Author

Jenkins, test this please.

@martinwicke

Copy link
Copy Markdown
Member

@petewarden The failures still show bazel 0.2, are the new docker files not pushed out yet? Or did something go wrong with the bazel update? Or is this just a too old test?

@vrv

vrv commented Apr 6, 2016

Copy link
Copy Markdown

@tensorflow-jenkins: test this please

@petewarden

Copy link
Copy Markdown
Contributor Author

This was a recent test, I need to debug what's going wrong on the Jenkins server. The install script does appear to be updated:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/ci_build/install/install_bazel.sh

@vrv

vrv commented Apr 8, 2016

Copy link
Copy Markdown

@tensorflow-jenkins: test this please

@martinwicke

Copy link
Copy Markdown
Member

I just checked, and at least on the Mac, bazel 0.2.1 is definitely installed

@jendap

jendap commented Apr 8, 2016

Copy link
Copy Markdown
Contributor

You have the same error in linux build with 0.2.1 as well as on mac where is 0.2.0.

@martinwicke you have checked only mac0-slave, right?

@caisq can you upgrade bazel on mac1-slave, please?

@martinwicke

Copy link
Copy Markdown
Member

Oh, right, I have only updated mac0-slave to 0.2.1.

@petewarden

Copy link
Copy Markdown
Contributor Author

I've installed the 0.2.1 binaries locally, and it seems like the fix we need didn't make it in, despite being in top-of-tree ahead of time! :( I'm following up with the Bazel team to find out what happened, and what we can do to fix this.

@Mistobaan

Copy link
Copy Markdown
Contributor

any updates on this patch?

@petewarden

Copy link
Copy Markdown
Contributor Author

We're currently blocked because the top-of-tree protobuf is broken, and we need that for iOS support. I'm working on fixing that right now.

@dauba-dauba

dauba-dauba commented May 9, 2016 •

Copy link
Copy Markdown
Contributor

I've been attempting to use this patch locally to see if I could manually work around the issues in protobuf. I've run into issues with Xcode 7 where object files built using the bazel cc_library rule can't be linked into an iOS simulator application due to metadata that's now being written into the object files. Going back to the bazel iOS example (http://bazel.io/docs/tutorial/ios-app.html) and adding some C++ code, I found that I was only able to get it to build properly if the C++ was added using an objc_library rule, not a cc_library rule.

I note that this patch currently only defines a cc_library rule for the tensorflow code. Does it also need to define an objc_library rule for the benefit of the simulator?

Edit: Explanation of Xcode 7's new object file metadata: https://karp.id.au/a/2015/09/15/xcode-7s-new-linker-rules/

@mtngld mtngld mentioned this pull request May 29, 2016
@martinwicke

Copy link
Copy Markdown
Member

@petewarden is this PR still active or can it be closed?

@vrv vrv closed this Jun 7, 2016
fsx950223 pushed a commit to fsx950223/tensorflow that referenced this pull request Nov 28, 2023
…bef_exec_matrix_ops_simple_test

Fix for BEF executable test failure for //tensorflow/compiler/xla/tes…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants