Git Product home page Git Product logo

Comments (9)

tanpengshi avatar tanpengshi commented on June 15, 2024

I would appreciate any working solution to this, as long i can run my model on Select Ops based on a TensorFlowLiteSelectTFOps library selectively built based on the tflite model itself. Thanks a lot in advance! :)

from tensorflow.

pkgoogle avatar pkgoogle commented on June 15, 2024

Hi @tanpengshi, it looks like the system is unable to properly link the google protobuf library ... can you ensure you are following all the directions here correctly: https://www.tensorflow.org/lite/guide/build_ios#using_local_swift_or_objective-c_apis

particularly I see that your path does not point to the TF root directory

pod 'TensorFlowLiteSwift', :path => '../../local-podspecs/TensorFlowLiteSwift.podspec'

Where as the source says:

pod 'TensorFlowLiteSwift', :path => '<your_tensorflow_root_dir>'

Let me know if that works. Thanks.

from tensorflow.

tanpengshi avatar tanpengshi commented on June 15, 2024

I have tried the above and I am still getting the same error. In addition I did :

  pod 'TensorFlowLiteSwift'
  pod 'TensorFlowLiteSelectTfOps', '~> 0.0.1-nightly'

Then replace i replaced the TensorFlowLiteSelectTfOps.framework with my selectively build TensorFlowLiteSelectTfOps.framework, and I still get the same error when building! I suspect the error comes inherently from the selectively built framework. Are you able to replicate the error I get?

Thank you!

from tensorflow.

pkgoogle avatar pkgoogle commented on June 15, 2024

Hi @tanpengshi, are you willing to share your model(s) that are used to make your selective build? I'm wondering if any particular ops are causing the issue. Perhaps you can just make a dummy model which includes at least one of all the ops you are using and share that.

from tensorflow.

tanpengshi avatar tanpengshi commented on June 15, 2024

tflite_CNN_LSTM_dummy.zip

Hi @pkgoogle, here is the dummy model that contains all the ops!

from tensorflow.

pkgoogle avatar pkgoogle commented on June 15, 2024

Hi @tanpengshi, I attempted to reproduce it with your model... I'm actually failing on the build the select framework step -- considering you were able to build the Select framework, can you share the steps that you use to build it?

I did this:

git switch r2.14 # to match your TF version
./configure
<Said yes to configure for iOS>
<copied your model file over>
bash tensorflow/lite/ios/build_frameworks.sh --input_models=tflite_CNN_LSTM_dummy.tflite --target_archs=x86_64,armv7,arm64

my output:

INFO: Analyzed target //tensorflow/lite/ios/tmp:TensorFlowLiteSelectTfOps_framework (473 packages loaded, 39899 targets configured).
INFO: Found 1 target...
ERROR: /Users/xxxxxxxxx/git/tensorflow/tensorflow/BUILD:1153:21: declared output 'tensorflow/libtensorflow_framework.2.dylib' was not created by genrule. This is probably because the genrule actually didn't create this output, or because the output was a directory and the genrule was run remotely (note that only the contents of declared file outputs are copied from genrules run remotely)
ERROR: /Users/xxxxxxxxx/git/tensorflow/tensorflow/BUILD:1153:21: Executing genrule //tensorflow:libtensorflow_framework.2.dylib_sym [for tool] failed: not all outputs were created or valid
realpath: illegal option -- -
usage: realpath [-q] [path ...]
Target //tensorflow/lite/ios/tmp:TensorFlowLiteSelectTfOps_framework failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2868.450s, Critical Path: 470.36s
INFO: 7940 processes: 1075 internal, 6865 local.
FAILED: Build did NOT complete successfully

from tensorflow.

tanpengshi avatar tanpengshi commented on June 15, 2024

Hi @pkgoogle I made a mistake, the tensorflow version should be r2.16 instead of r.2.14. When I used r2.16, I can successfully build the model, while r2.14 produced similar error.

from tensorflow.

pkgoogle avatar pkgoogle commented on June 15, 2024

Hmm I'm now currently running into a different issue... which python version are you using? I'm using an M1 and Xcode = 15.0.1. Any other potential environmental difference you can possibly think of?

ERROR: /Users/xxxxxxxx/git/tensorflow/tensorflow/python/BUILD:650:24: Linking tensorflow/python/_pywrap_tensorflow_internal.so [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //tensorflow/python:_pywrap_tensorflow_internal.so) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin_arm64-opt-exec-50AE0418-ST-c5da4e9d584e/bin/tensorflow/python/_pywrap_tensorflow_internal.so-2.params
ld: building exports trie: duplicate symbol '__ZN40TableStruct_tsl_2fprotobuf_2fdnn_2eproto7offsetsE'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in child process '/usr/bin/xcrun'. 1
Target //tensorflow/lite/ios/tmp:TensorFlowLiteSelectTfOps_framework failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4574.330s, Critical Path: 373.41s
INFO: 14670 processes: 407 internal, 14263 local.

from tensorflow.

tanpengshi avatar tanpengshi commented on June 15, 2024

My apologies again, if you use TensorFlow r2.16, you will run into the issue later on in Xcode:

The TensorFlow version should instead be r2.9, with the .frameworks bazel installed with Python 3.9 installed with Anaconda with M3 and Xcode 15.3

from tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.