[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling test case failure [TensorFlow Lite] #52392

Closed
KangGrandesty opened this issue Oct 15, 2021 · 5 comments
Closed

Compiling test case failure [TensorFlow Lite] #52392

KangGrandesty opened this issue Oct 15, 2021 · 5 comments
Assignees
Labels
comp:lite TF Lite related issues stat:awaiting response Status - Awaiting response from author subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.4 for issues related to TF 2.4 type:build/install Build and install issues

Comments

@KangGrandesty
Copy link

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): v2.4.3
  • Python version: 3.7
  • Bazel version (if compiling from source): 3.1.0
  • GCC/Compiler version (if compiling from source): gcc 7.5.0
  • CUDA/cuDNN version: No
  • GPU model and memory: No
  1. configure
./configure

output

You have bazel 3.1.0 installed.
Please specify the location of python. [Default is /media/envs/miniconda/envs/tf2.x/bin/python3]: 


Found possible Python library paths:
  /media/xx/code/AnimaX
  /media/envs/miniconda/envs/tf2.x/lib/python3.7/site-packages
Please input the desired Python library path to use.  Default is [/media/xx/code/AnimaX]

Do you wish to build TensorFlow with ROCm support? [y/N]: 
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: 
No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: 
Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: 


Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: y
Searching for NDK and SDK installations.

Please specify the home path of the Android NDK to use. [Default is /home/xx/Android/Sdk/ndk-bundle]: /home/xx/Android/Sdk/ndk/18.1.5063045


Please specify the (min) Android NDK API level to use. [Available levels: ['16', '17', '18', '19', '21', '22', '23', '24', '26', '27', '28']] [Default is 21]: 


Please specify the home path of the Android SDK to use. [Default is /home/xx/Android/Sdk]: 


Please specify the Android SDK API level to use. [Available levels: ['19', '30']] [Default is 30]: 


Please specify an Android build tools version to use. [Available versions: ['19.1.0', '30.0.2']] [Default is 30.0.2]: 


Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
	--config=mkl         	# Build with MKL support.
	--config=mkl_aarch64 	# Build with oneDNN support for Aarch64.
	--config=monolithic  	# Config for mostly static monolithic build.
	--config=ngraph      	# Build with Intel nGraph support.
	--config=numa        	# Build with NUMA support.
	--config=dynamic_kernels	# (Experimental) Build kernels into separate shared objects.
	--config=v2          	# Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
	--config=noaws       	# Disable AWS S3 filesystem support.
	--config=nogcp       	# Disable GCP support.
	--config=nohdfs      	# Disable HDFS support.
	--config=nonccl      	# Disable NVIDIA NCCL support.
Configuration finished
  1. build
bash tensorflow/lite/tools/build_aar.sh

without any exception.

  1. test
bazel build -c opt  //tensorflow/lite/kernels:reverse_test

output

INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=146
INFO: Reading rc options for 'build' from /media/xx/libraries/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /media/xx/libraries/tensorflow/.bazelrc:
  'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --define=tensorflow_enable_mlir_generated_gpu_kernels=0 --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 --noincompatible_prohibit_aapt1 --enable_platform_specific_config --config=short_logs --config=v2
INFO: Reading rc options for 'build' from /media/xx/libraries/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/media/envs/miniconda/envs/tf2.x/bin/python3 --action_env PYTHON_LIB_PATH=/media/xx/code/AnimaX --python_path=/media/envs/miniconda/envs/tf2.x/bin/python3 --action_env PYTHONPATH=/media/envs/install/pangolin/lib/python3.7/dist-packages:/media/envs/install/g2o/lib/python3.7/dist-packages:/media/envs/install/nvtop/lib/python3.7/dist-packages:/media/envs/install/ceres-solver/lib/python3.7/dist-packages:/media/envs/install/vtk/lib/python3.7/dist-packages:/media/envs/install/protobuf/lib/python3.7/dist-packages:/media/envs/install/opencv/lib/python3.7/dist-packages:/media/envs/install/cmake/lib/python3.7/dist-packages:/media/envs/install/openmpi/lib/python3.7/dist-packages:/media/envs/install/pangolin/lib/python3.7/dist-packages:/media/envs/install/g2o/lib/python3.7/dist-packages:/media/envs/install/nvtop/lib/python3.7/dist-packages:/media/envs/install/ceres-solver/lib/python3.7/dist-packages:/media/envs/install/vtk/lib/python3.7/dist-packages:/media/envs/install/protobuf/lib/python3.7/dist-packages:/media/envs/install/opencv/lib/python3.7/dist-packages:/media/envs/install/cmake/lib/python3.7/dist-packages:/media/envs/install/openmpi/lib/python3.7/dist-packages::/media/xx/code/AnimaX:/media/xx/code/AnimaX --config=xla --action_env ANDROID_NDK_HOME=/home/xx/Android/Sdk/ndk/18.1.5063045 --action_env ANDROID_NDK_API_LEVEL=21 --action_env ANDROID_BUILD_TOOLS_VERSION=30.0.2 --action_env ANDROID_SDK_API_LEVEL=30 --action_env ANDROID_SDK_HOME=/home/xx/Android/Sdk --action_env TF_CONFIGURE_IOS=0
INFO: Found applicable config definition build:short_logs in file /media/xx/libraries/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /media/xx/libraries/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:xla in file /media/xx/libraries/tensorflow/.bazelrc: --define=with_xla_support=true
INFO: Found applicable config definition build:linux in file /media/xx/libraries/tensorflow/.bazelrc: --copt=-w --host_copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --config=dynamic_kernels
INFO: Found applicable config definition build:dynamic_kernels in file /media/xx/libraries/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
INFO: Build options --cxxopt, --fat_apk_cpu, and --host_crosstool_top have changed, discarding analysis cache.
INFO: Analyzed target //tensorflow/lite/kernels:reverse_test (26 packages loaded, 3873 targets configured).
INFO: Found 1 target...
ERROR: /media/xx/libraries/tensorflow/tensorflow/lite/kernels/internal/BUILD:720:1: C++ compilation of rule '//tensorflow/lite/kernels/internal:kernel_utils' failed (Exit 1)
In file included from tensorflow/lite/kernels/internal/kernel_utils.cc:19:0:
./tensorflow/lite/kernels/internal/tensor_utils.h: In function 'void tflite::tensor_utils::ApplyTanhToVector(const float*, int, float*)':
./tensorflow/lite/kernels/internal/tensor_utils.h:550:39: error: 'Vector' is not a member of 'Eigen'
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                       ^~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:550:39: note: suggested alternative: 'VectorXd'
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                       ^~~~~~
                                       VectorXd
./tensorflow/lite/kernels/internal/tensor_utils.h:550:39: error: 'Vector' is not a member of 'Eigen'
./tensorflow/lite/kernels/internal/tensor_utils.h:550:39: note: suggested alternative: 'VectorXd'
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                       ^~~~~~
                                       VectorXd
./tensorflow/lite/kernels/internal/tensor_utils.h:550:67: error: template argument 1 is invalid
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                                                   ^~
./tensorflow/lite/kernels/internal/tensor_utils.h:551:3: error: 'VectorMap' was not declared in this scope
   VectorMap input_map(const_cast<float* __restrict__>(vector), v_size);
   ^~~~~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:551:3: note: suggested alternative: 'vector'
   VectorMap input_map(const_cast<float* __restrict__>(vector), v_size);
   ^~~~~~~~~
   vector
./tensorflow/lite/kernels/internal/tensor_utils.h:552:13: error: expected ';' before 'output_map'
   VectorMap output_map(result, v_size);
             ^~~~~~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:553:3: error: 'output_map' was not declared in this scope
   output_map.array() = input_map.array().tanh();
   ^~~~~~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:553:24: error: 'input_map' was not declared in this scope
   output_map.array() = input_map.array().tanh();
                        ^~~~~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h: In function 'void tflite::tensor_utils::ApplySigmoidToVector(const float*, int, float*)':
./tensorflow/lite/kernels/internal/tensor_utils.h:567:39: error: 'Vector' is not a member of 'Eigen'
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                       ^~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:567:39: note: suggested alternative: 'VectorXd'
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                       ^~~~~~
                                       VectorXd
./tensorflow/lite/kernels/internal/tensor_utils.h:567:39: error: 'Vector' is not a member of 'Eigen'
./tensorflow/lite/kernels/internal/tensor_utils.h:567:39: note: suggested alternative: 'VectorXd'
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                       ^~~~~~
                                       VectorXd
./tensorflow/lite/kernels/internal/tensor_utils.h:567:67: error: template argument 1 is invalid
   using VectorMap = Eigen::Map<Eigen::Vector<float, Eigen::Dynamic>>;
                                                                   ^~
./tensorflow/lite/kernels/internal/tensor_utils.h:568:3: error: 'VectorMap' was not declared in this scope
   VectorMap input_map(const_cast<float* __restrict__>(vector), v_size);
   ^~~~~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:568:3: note: suggested alternative: 'vector'
   VectorMap input_map(const_cast<float* __restrict__>(vector), v_size);
   ^~~~~~~~~
   vector
./tensorflow/lite/kernels/internal/tensor_utils.h:569:13: error: expected ';' before 'output_map'
   VectorMap output_map(result, v_size);
             ^~~~~~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:570:3: error: 'output_map' was not declared in this scope
   output_map.array() = input_map.array().logistic();
   ^~~~~~~~~~
./tensorflow/lite/kernels/internal/tensor_utils.h:570:24: error: 'input_map' was not declared in this scope
   output_map.array() = input_map.array().logistic();
                        ^~~~~~~~~
Target //tensorflow/lite/kernels:reverse_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.225s, Critical Path: 1.62s
INFO: 27 processes: 27 local.
FAILED: Build did NOT complete successfully
@sushreebarsa sushreebarsa added comp:lite TF Lite related issues TF 2.4 for issues related to TF 2.4 type:build/install Build and install issues type:bug Bug subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues and removed type:bug Bug labels Oct 15, 2021
@Saduf2019 Saduf2019 assigned Saduf2019 and unassigned sushreebarsa Oct 18, 2021
@Saduf2019
Copy link
Contributor

@KangGrandesty
Could you please try on 2.5/2.6 and let us know if you still face the issue.

@Saduf2019 Saduf2019 added the stat:awaiting response Status - Awaiting response from author label Oct 18, 2021
@KangGrandesty
Copy link
Author
  • v2.5.0
  • v2.6.0
  • v2.7.0-rc0
  • nightly

All checked tags&branches occur the same excpetion.

@Saduf2019

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Oct 20, 2021
@jvishnuvardhan jvishnuvardhan added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Dec 3, 2021
@mohantym mohantym self-assigned this May 20, 2022
@mohantym
Copy link
Contributor

Hi @KangGrandesty ! We are checking whether you still need help with this issue. Have you tested with Bazel 4.2.1/5.0.0 and TF 2.8/2.9 respectively. Thank you!

@mohantym mohantym added stat:awaiting response Status - Awaiting response from author and removed stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Jun 15, 2022
@KangGrandesty
Copy link
Author

We just use TF 2.4 and are not plan to upgrade version. @mohantym

Even the test cases report errors, some of our models still work. And we make trade-off between other models and tflite.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues stat:awaiting response Status - Awaiting response from author subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.4 for issues related to TF 2.4 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

7 participants