Closed contractorwolf closed 3 years ago
There is a change in numpy 1.19 that breaks the build. Open tensorflow\python\lib\core\bfloat16.cc and make the following changes:
Around line # 508, is the function CompareUFunc, add "const" to the parameters, like this:
template
Line # 493, is the function BinaryUFunc add "const" here too:
template <typename InType, typename OutType, typename Functor> void BinaryUFunc(char* args, npy_intp const dimensions, npy_intp const steps, void data) {
You should be able to get past this error.
Hi There,
We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.
This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.
Hi There,
We are checking to see if you still need help on this, as you are using an older version of tensorflow which is officially considered end of life . We recommend that you upgrade to the latest 2.x version and let us know if the issue still persists in newer versions. Please open a new issue for any help you need against 2.x, and we will get you the right help.
This issue will be closed automatically 7 days from now. If you still need help with this issue, please provide us with more information.
Hello, I have encountered this problem in other versions. Do you need to correct your own mistakes?
There is a change in numpy 1.19 that breaks the build. Open tensorflow\python\lib\core\bfloat16.cc and make the following changes:
Around line # 508, is the function CompareUFunc, add "const" to the parameters, like this:
template void CompareUFunc(char* args, npy_intp const dimensions, npy_intp const steps, void data) { BinaryUFunc<bfloat16, npy_bool, Functor>(args, dimensions, steps, data); }
Line # 493, is the function BinaryUFunc add "const" here too:
template <typename InType, typename OutType, typename Functor> void BinaryUFunc(char* args, npy_intp const dimensions, npy_intp const steps, void data) {
You should be able to get past this error.
If I reduce to version 1.18, can I solve this problem
@sanatmpa1 I switched to doing this is Colab and made a walk through if anyone wants to see it: https://colab.research.google.com/drive/1uEkP5j7KM9eSkCUtUyauy7-Dyd5XAY6e?usp=sharing
There is a change in numpy 1.19 that breaks the build. Open tensorflow\python\lib\core\bfloat16.cc and make the following changes:
Around line # 508, is the function CompareUFunc, add "const" to the parameters, like this:
template void CompareUFunc(char* args, npy_intp const dimensions, npy_intp const steps, void data) { BinaryUFunc<bfloat16, npy_bool, Functor>(args, dimensions, steps, data); }
Line # 493, is the function BinaryUFunc add "const" here too:
template <typename InType, typename OutType, typename Functor> void BinaryUFunc(char* args, npy_intp const dimensions, npy_intp const steps, void data) {
You should be able to get past this error.
Please note for the changes made here :
It is not only editing the function but adding another deceleration :
System information
I am following the instructions laid out in this tutorial (starting at Step 2) to convert my model for use by tflite: https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi#part-1---how-to-train-convert-and-run-custom-tensorflow-lite-object-detection-models-on-windows-10
everything seems to work find until I try and build using babel with this command:
It start off fine and runs for a while but then fails with this output:
INFO: From Linking tensorflow/python/gen_lookup_ops_py_wrappers_cc.exe: Creating library bazel-out/x64_windows-opt/bin/tensorflow/python/gen_lookup_ops_py_wrappers_cc.lib and object bazel-out/x64_windows-opt/bin/tensorflow/python/gen_lookup_ops_py_wrappers_cc.exp INFO: From Linking tensorflow/python/gen_script_ops_py_wrappers_cc.exe: Creating library bazel-out/x64_windows-opt/bin/tensorflow/python/gen_script_ops_py_wrappers_cc.lib and object bazel-out/x64_windows-opt/bin/tensorflow/python/gen_script_ops_py_wrappers_cc.exp INFO: From Linking tensorflow/python/gen_bitwise_ops_py_wrappers_cc.exe: Creating library bazel-out/x64_windows-opt/bin/tensorflow/python/gen_bitwise_ops_py_wrappers_cc.lib and object bazel-out/x64_windows-opt/bin/tensorflow/python/gen_bitwise_ops_py_wrappers_cc.exp INFO: From Linking tensorflow/python/gen_ragged_conversion_ops_py_wrappers_cc.exe: Creating library bazel-out/x64_windows-opt/bin/tensorflow/python/gen_ragged_conversion_ops_py_wrappers_cc.lib and object bazel-out/x64_windows-opt/bin/tensorflow/python/gen_ragged_conversion_ops_py_wrappers_cc.exp INFO: From Linking tensorflow/python/gen_ragged_math_ops_py_wrappers_cc.exe: Creating library bazel-out/x64_windows-opt/bin/tensorflow/python/gen_ragged_math_ops_py_wrappers_cc.lib and object bazel-out/x64_windows-opt/bin/tensorflow/python/gen_ragged_math_ops_py_wrappers_cc.exp ERROR: C:/tensorflow-build/tensorflow/tensorflow/python/BUILD:293:1: C++ compilation of rule '//tensorflow/python:bfloat16_lib' failed (Exit 2): cl.exe failed: error executing command cd C:/users/james/_bazel_james/j7bi4x5j/execroot/org_tensorflow SET INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt; SET PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;C:\WINDOWS\Microsoft.NET\Framework64\;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\;;C:\WINDOWS\system32 SET PWD=/proc/self/cwd SET PYTHON_BIN_PATH=C:/ProgramData/Anaconda3/envs/tensorflow-build/python.exe SET PYTHON_LIB_PATH=C:/ProgramData/Anaconda3/envs/tensorflow-build/lib/site-packages SET TEMP=C:\Users\james\AppData\Local\Temp SET TF_DOWNLOAD_CLANG=0 SET TF_NEED_CUDA=0 SET TF_NEED_OPENCL_SYCL=0 SET TF_NEED_ROCM=0 SET TMP=C:\Users\james\AppData\Local\Temp C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 /wd4250 /wd4996 /I. /Ibazel-out/x64_windows-opt/genfiles /Ibazel-out/x64_windows-opt/bin /Iexternal/com_google_absl /Ibazel-out/x64_windows-opt/genfiles/external/com_google_absl /Ibazel-out/x64_windows-opt/bin/external/com_google_absl /Iexternal/eigen_archive /Ibazel-out/x64_windows-opt/genfiles/external/eigen_archive /Ibazel-out/x64_windows-opt/bin/external/eigen_archive /Iexternal/local_config_sycl /Ibazel-out/x64_windows-opt/genfiles/external/local_config_sycl /Ibazel-out/x64_windows-opt/bin/external/local_config_sycl /Iexternal/nsync /Ibazel-out/x64_windows-opt/genfiles/external/nsync /Ibazel-out/x64_windows-opt/bin/external/nsync /Iexternal/gif_archive /Ibazel-out/x64_windows-opt/genfiles/external/gif_archive /Ibazel-out/x64_windows-opt/bin/external/gif_archive /Iexternal/jpeg /Ibazel-out/x64_windows-opt/genfiles/external/jpeg /Ibazel-out/x64_windows-opt/bin/external/jpeg /Iexternal/protobuf_archive /Ibazel-out/x64_windows-opt/genfiles/external/protobuf_archive /Ibazel-out/x64_windows-opt/bin/external/protobuf_archive /Iexternal/com_googlesource_code_re2 /Ibazel-out/x64_windows-opt/genfiles/external/com_googlesource_code_re2 /Ibazel-out/x64_windows-opt/bin/external/com_googlesource_code_re2 /Iexternal/farmhash_archive /Ibazel-out/x64_windows-opt/genfiles/external/farmhash_archive /Ibazel-out/x64_windows-opt/bin/external/farmhash_archive /Iexternal/fft2d /Ibazel-out/x64_windows-opt/genfiles/external/fft2d /Ibazel-out/x64_windows-opt/bin/external/fft2d /Iexternal/highwayhash /Ibazel-out/x64_windows-opt/genfiles/external/highwayhash /Ibazel-out/x64_windows-opt/bin/external/highwayhash /Iexternal/zlib_archive /Ibazel-out/x64_windows-opt/genfiles/external/zlib_archive /Ibazel-out/x64_windows-opt/bin/external/zlib_archive /Iexternal/double_conversion /Ibazel-out/x64_windows-opt/genfiles/external/double_conversion /Ibazel-out/x64_windows-opt/bin/external/double_conversion /Iexternal/snappy /Ibazel-out/x64_windows-opt/genfiles/external/snappy /Ibazel-out/x64_windows-opt/bin/external/snappy /Iexternal/local_config_python /Ibazel-out/x64_windows-opt/genfiles/external/local_config_python /Ibazel-out/x64_windows-opt/bin/external/local_config_python /Iexternal/local_config_cuda /Ibazel-out/x64_windows-opt/genfiles/external/local_config_cuda /Ibazel-out/x64_windows-opt/bin/external/local_config_cuda /Iexternal/lmdb /Ibazel-out/x64_windows-opt/genfiles/external/lmdb /Ibazel-out/x64_windows-opt/bin/external/lmdb /Iexternal/org_sqlite /Ibazel-out/x64_windows-opt/genfiles/external/org_sqlite /Ibazel-out/x64_windows-opt/bin/external/org_sqlite /Iexternal/png_archive /Ibazel-out/x64_windows-opt/genfiles/external/png_archive /Ibazel-out/x64_windows-opt/bin/external/png_archive /Iexternal/icu /Ibazel-out/x64_windows-opt/genfiles/external/icu /Ibazel-out/x64_windows-opt/bin/external/icu /Iexternal/grpc /Ibazel-out/x64_windows-opt/genfiles/external/grpc /Ibazel-out/x64_windows-opt/bin/external/grpc /Iexternal/com_github_nanopb_nanopb /Ibazel-out/x64_windows-opt/genfiles/external/com_github_nanopb_nanopb /Ibazel-out/x64_windows-opt/bin/external/com_github_nanopb_nanopb /Iexternal/boringssl /Ibazel-out/x64_windows-opt/genfiles/external/boringssl /Ibazel-out/x64_windows-opt/bin/external/boringssl /Iexternal/eigen_archive /Ibazel-out/x64_windows-opt/genfiles/external/eigen_archive /Ibazel-out/x64_windows-opt/bin/external/eigen_archive /Iexternal/nsync/public /Ibazel-out/x64_windows-opt/genfiles/external/nsync/public /Ibazel-out/x64_windows-opt/bin/external/nsync/public /Iexternal/gif_archive/lib /Ibazel-out/x64_windows-opt/genfiles/external/gif_archive/lib /Ibazel-out/x64_windows-opt/bin/external/gif_archive/lib /Iexternal/gif_archive/windows /Ibazel-out/x64_windows-opt/genfiles/external/gif_archive/windows /Ibazel-out/x64_windows-opt/bin/external/gif_archive/windows /Iexternal/protobuf_archive/src /Ibazel-out/x64_windows-opt/genfiles/external/protobuf_archive/src /Ibazel-out/x64_windows-opt/bin/external/protobuf_archive/src /Iexternal/farmhash_archive/src /Ibazel-out/x64_windows-opt/genfiles/external/farmhash_archive/src /Ibazel-out/x64_windows-opt/bin/external/farmhash_archive/src /Iexternal/zlib_archive /Ibazel-out/x64_windows-opt/genfiles/external/zlib_archive /Ibazel-out/x64_windows-opt/bin/external/zlib_archive /Iexternal/double_conversion /Ibazel-out/x64_windows-opt/genfiles/external/double_conversion /Ibazel-out/x64_windows-opt/bin/external/double_conversion /Iexternal/local_config_python/numpy_include /Ibazel-out/x64_windows-opt/genfiles/external/local_config_python/numpy_include /Ibazel-out/x64_windows-opt/bin/external/local_config_python/numpy_include /Iexternal/local_config_python/python_include /Ibazel-out/x64_windows-opt/genfiles/external/local_config_python/python_include /Ibazel-out/x64_windows-opt/bin/external/local_config_python/python_include /Iexternal/local_config_cuda/cuda /Ibazel-out/x64_windows-opt/genfiles/external/local_config_cuda/cuda /Ibazel-out/x64_windows-opt/bin/external/local_config_cuda/cuda /Iexternal/local_config_cuda/cuda/cuda/include /Ibazel-out/x64_windows-opt/genfiles/external/local_config_cuda/cuda/cuda/include /Ibazel-out/x64_windows-opt/bin/external/local_config_cuda/cuda/cuda/include /Iexternal/local_config_cuda/cuda/cuda/include/crt /Ibazel-out/x64_windows-opt/genfiles/external/local_config_cuda/cuda/cuda/include/crt /Ibazel-out/x64_windows-opt/bin/external/local_config_cuda/cuda/cuda/include/crt /Iexternal/png_archive /Ibazel-out/x64_windows-opt/genfiles/external/png_archive /Ibazel-out/x64_windows-opt/bin/external/png_archive /Iexternal/icu/icu4c/source/common /Ibazel-out/x64_windows-opt/genfiles/external/icu/icu4c/source/common /Ibazel-out/x64_windows-opt/bin/external/icu/icu4c/source/common /Iexternal/grpc/include /Ibazel-out/x64_windows-opt/genfiles/external/grpc/include /Ibazel-out/x64_windows-opt/bin/external/grpc/include /Iexternal/grpc/third_party/address_sorting/include /Ibazel-out/x64_windows-opt/genfiles/external/grpc/third_party/address_sorting/include /Ibazel-out/x64_windows-opt/bin/external/grpc/third_party/address_sorting/include /Iexternal/boringssl/src/include /Ibazel-out/x64_windows-opt/genfiles/external/boringssl/src/include /Ibazel-out/x64_windows-opt/bin/external/boringssl/src/include /DCLANG_SUPPORT_DYN_ANNOTATION__ /DEIGEN_MPL2_ONLY /DEIGEN_MAX_ALIGN_BYTES=64 /DEIGEN_HAS_TYPE_TRAITS=0 /DTF_USE_SNAPPY /DSQLITE_OMIT_DEPRECATED /DGRPC_ARES=0 /DPB_FIELD_32BIT=1 /showIncludes /MD /O2 /Oy- /DNDEBUG /wd4117 -DDATE="redacted" -DTIMESTAMP="redacted" -DTIME="redacted" /Gy /Gw -w /arch:AVX /Fobazel-out/x64_windows-opt/bin/tensorflow/python/_objs/bfloat16_lib/bfloat16.obj /c tensorflow/python/lib/core/bfloat16.cc Execution platform: @bazel_tools//platforms:host_platform *tensorflow/python/lib/core/bfloat16.cc(634): error C2664: 'bool tensorflow::`anonymous-namespace'::Initialize::::operator ()(const char ,PyUFuncGenericFunction,const std::array<int,3> &) const': cannot convert argument 2 from 'void (cdecl *)(char ,npy_intp ,npy_intp ,void *)' to 'PyUFuncGenericFunction'
tensorflow/python/lib/core/bfloat16.cc(634): note: None of the functions with this name in scope match the target type
tensorflow/python/lib/core/bfloat16.cc(638): error C2664: 'bool tensorflow::`anonymous-namespace'::Initialize::::operator ()(const char ,PyUFuncGenericFunction,const std::array<int,3> &) const': cannot convert argument 2 from 'void (__cdecl )(char ,npy_intp ,npy_intp ,void )' to 'PyUFuncGenericFunction'
tensorflow/python/lib/core/bfloat16.cc(638): note: None of the functions with this name in scope match the target type
tensorflow/python/lib/core/bfloat16.cc(641): error C2664: 'bool tensorflow::`anonymous-namespace'::Initialize::::operator ()(const char ,PyUFuncGenericFunction,const std::array<int,3> &) const': cannot convert argument 2 from 'void (__cdecl *)(char ,npy_intp ,npy_intp ,void )' to 'PyUFuncGenericFunction'
tensorflow/python/lib/core/bfloat16.cc(641): note: None of the functions with this name in scope match the target type
tensorflow/python/lib/core/bfloat16.cc(645): error C2664: 'bool tensorflow::`anonymous-namespace'::Initialize::::operator ()(const char ,PyUFuncGenericFunction,const std::array<int,3> &) const': cannot convert argument 2 from 'void (cdecl *)(char *,npy_intp ,npy_intp ,void )' to 'PyUFuncGenericFunction'
tensorflow/python/lib/core/bfloat16.cc(645): note: None of the functions with this name in scope match the target type
tensorflow/python/lib/core/bfloat16.cc(649): error C2664: 'bool tensorflow::::operator ()(const char *,PyUFuncGenericFunction,const std::array<int,3> &) const': cannot convert argument 2 from 'void ( cdecl *)(char *,npy_intp ,npy_intp ,void )' to 'PyUFuncGenericFunction'
tensorflow/python/lib/core/bfloat16.cc(653): note: None of the functions with this name in scope match the target type
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 107.347s, Critical Path: 59.11s
INFO: 206 processes: 206 local.
FAILED: Build did NOT complete successfully
anonymous-namespace'::Initialize::<lambda_d0df84676ae54709cf34c880a157d294>::operator ()(const char *,PyUFuncGenericFunction,const std::array<int,3> &) const': cannot convert argument 2 from 'void (__cdecl *)(char **,npy_intp *,npy_intp *,void *)' to 'PyUFuncGenericFunction' tensorflow/python/lib/core/bfloat16.cc(649): note: None of the functions with this name in scope match the target type tensorflow/python/lib/core/bfloat16.cc(653): error C2664: 'bool tensorflow::
anonymous-namespace'::Initialize::