tensorflow: Bad CRC while building TensorFlowLiteSelectTfOps_framework
Click to expand!
Issue Type
Build/Install
Have you reproduced the bug with TF nightly?
Yes
Source
source
Tensorflow Version
2.11.0
Custom Code
No
OS Platform and Distribution
Macbook Air M1, Ventura 13.1
Mobile device
No response
Python version
3.10.10
Bazel version
5.3.0
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
Executing the following command:
bazel build -c opt --config=ios --ios_multi_cpus=arm64,x86_64 \
//tensorflow/lite/ios:TensorFlowLiteSelectTfOps_framework
results in the following error:
ERROR: /Users/vishnu/work/ente/tensorflow/tensorflow/lite/ios/BUILD:146:21: Processing and signing TensorFlowLiteSelectTfOps_framework failed: (Exit 2): process-and-sign--932494739.sh failed: error executing command bazel-out/applebin_ios-ios_arm64-opt-ST-82c2c37ad712/bin/tensorflow/lite/ios/TensorFlowLiteSelectTfOps_framework-intermediates/process-and-sign--932494739.sh should_compress
bazel-out/applebin_ios-ios_arm64-opt-ST-82c2c37ad712/bin/tensorflow/lite/ios/TensorFlowLiteSelectTfOps_framework_archive-root/TensorFlowLiteSelectTfOps.framework/TensorFlowLiteSelectTfOps bad CRC a72ee873 (should be a131c8e2)
Standalone code to reproduce the issue
Executing the following command on the current main (0c955358f75cc3d2f0e21e60cb9b3a2bd3faa24b) as well as v2.11.0 reproduces the error:
bazel build -c opt --config=ios --ios_multi_cpus=arm64,x86_64 \
//tensorflow/lite/ios:TensorFlowLiteSelectTfOps_framework
Relevant log output
bazel build -c opt --config=ios --ios_multi_cpus=arm64,x86_64 \
//tensorflow/lite/ios:TensorFlowLiteSelectTfOps_framework
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=101
INFO: Reading rc options for 'build' from /Users/vishnu/work/ente/tensorflow/.bazelrc:
Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/vishnu/work/ente/tensorflow/.bazelrc:
'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false
INFO: Reading rc options for 'build' from /Users/vishnu/work/ente/tensorflow/.tf_configure.bazelrc:
'build' options: --action_env PYTHON_BIN_PATH=/opt/homebrew/opt/python@3.10/bin/python3.10 --action_env PYTHON_LIB_PATH=/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages --python_path=/opt/homebrew/opt/python@3.10/bin/python3.10
INFO: Reading rc options for 'build' from /Users/vishnu/work/ente/tensorflow/.bazelrc:
'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/common,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file /Users/vishnu/work/ente/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/vishnu/work/ente/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:ios in file /Users/vishnu/work/ente/tensorflow/.bazelrc: --apple_platform_type=ios --apple_bitcode=embedded --copt=-fembed-bitcode --copt=-Wno-c++11-narrowing --noenable_platform_specific_config --copt=-w --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --define=with_xla_support=false
INFO: Analyzed target //tensorflow/lite/ios:TensorFlowLiteSelectTfOps_framework (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/vishnu/work/ente/tensorflow/tensorflow/lite/ios/BUILD:146:21: Processing and signing TensorFlowLiteSelectTfOps_framework failed: (Exit 2): process-and-sign--932494739.sh failed: error executing command bazel-out/applebin_ios-ios_arm64-opt-ST-82c2c37ad712/bin/tensorflow/lite/ios/TensorFlowLiteSelectTfOps_framework-intermediates/process-and-sign--932494739.sh should_compress
bazel-out/applebin_ios-ios_arm64-opt-ST-82c2c37ad712/bin/tensorflow/lite/ios/TensorFlowLiteSelectTfOps_framework_archive-root/TensorFlowLiteSelectTfOps.framework/TensorFlowLiteSelectTfOps bad CRC a72ee873 (should be a131c8e2)
Target //tensorflow/lite/ios:TensorFlowLiteSelectTfOps_framework failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 38.891s, Critical Path: 38.60s
INFO: 4 processes: 3 internal, 1 local.
FAILED: Build did NOT complete successfully
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (9 by maintainers)
FYI, I just submitted the fixes for the TensorFlowLiteSelectTfOps_framework. They should be in tonight’s release.
FYI, Just verified TensorFlowLiteSelectTfOps 0.0.1-nightly.20230414 is working.
Hi I just verified that 0.0.1-nightly.20220915 is working fine. Can you switch to this version?
Did you also include the c framework? TensorFlowLiteSelectTfOps only has the custom ops. You need to build the TensorFlowLiteC as well. It has the tflite runtime and builtin ops. You can find instructions here.
Yes this is normal, TensorFlowLiteSelectTfOps is very large so if your model only use tflite builtin ops, you don’t need to build TensorFlowLiteSelectTfOps. Besides, we also release TensorFlowLiteSelectTfOps via cocoapods, so you can install it from cocoapods.
Can you try the following command?
bazel build -c opt --config=ios --ios_multi_cpus=sim_arm64 //tensorflow/lite/ios:TensorFlowLiteSelectTfOps_frameworkorbazel build -c opt --config=ios --ios_multi_cpus=arm64 //tensorflow/lite/ios:TensorFlowLiteSelectTfOps_framework