tensorflow: Multiple problems building TFLite 2.9.1
Click to expand!
Issue Type
Build/Install
Source
source
Tensorflow Version
2.9.1
Custom Code
No
OS Platform and Distribution
iOS
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
1. tensorflow/lite/c/CMakeLists.txt references common.c. Actual file at the referenced location is common.cc
2. With default TFL_MINIMUM_OS_VERSION=9.0 in tensorflow/lite/ios/ios.bzl, there is a compile-time error in Eigen related to thread local storage. Need that value bumped to 10.0 or 11.0 by default.
3. Upon the successful completion of `bazel build --config=ios_fat -c opt //tensorflow/lite/ios:TensorFlowLiteC_static_framework`, the `bazel-bin` folder is empty. The output can be found in `bazel-out/applebin_ios-ios_armv7-opt-ST-5b7531beec20/bin/tensorflow/lite/ios/TensorFlowLiteC_static_framework.zip` instead
4. Why is the hard dependency on Bazel version? Why does it have to be 5.0.0 and can not be 5.1.1? This makes it very unfriendly for CI environment.
Standalone code to reproduce the issue
Just build it out of the box.
Relevant log output
INFO: Found 1 target...
Target //tensorflow/lite/ios:TensorFlowLiteC_static_framework up-to-date:
bazel-out/applebin_ios-ios_armv7-opt-ST-5b7531beec20/bin/tensorflow/lite/ios/TensorFlowLiteC_static_framework.zip
INFO: Elapsed time: 0.280s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Compared to 2.7.1:
Target //tensorflow/lite/ios:TensorFlowLiteC_static_framework up-to-date:
bazel-bin/tensorflow/lite/ios/TensorFlowLiteC_static_framework.zip
INFO: Elapsed time: 411.210s, Critical Path: 80.19s
INFO: 3901 processes: 227 internal, 3674 local.
INFO: Build completed successfully, 3901 total actions
INFO: Build completed successfully, 3901 total actions
</details>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (6 by maintainers)
ABSL when compiled with different C++ standard (e.g., -std=c++14 vs. -std=c++17) may result in different binary. Some TFLite component changed to used C++17 (e.g., metal delegate), so a quick solution is to add
--cxxopt=-std=c++17 --host_cxxopt=-std=c++17to you bazel build flags.