tensorflow / addons

Useful extra functionality for TensorFlow 2.x maintained by SIG-addons
Apache License 2.0
1.69k stars 611 forks source link

Jetson AGX Xavier 0.15.0 build requires std=c++14 in the crosstool chain configuration #2612

Closed girgink closed 2 years ago

girgink commented 2 years ago

System information

Describe the bug Because Jetson AGX Xavier has CUDA 10.2, the system includes build_deps/toolchains/gpu/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl, which only defines rules for C++11. However TF 2.7.0 uses C++14 (e.g. in tensorflow/core/framework/tensor_types.h, MaybeWith32BitIndexingImpl<Eigen::GpuDevice>.operator()). Therefore build fails.

Code to reproduce the issue

TF_NEED_CUDA="1" \
TF_CUDA_VERSION="10.2" \
TF_CUDNN_VERSION="8" \
CUDNN_INSTALL_PATH="/usr/lib/aarch64-linux-gnu" \
python ./configure.py

bazel build build_pip_pkg

Other info / logs

Replacing all c++11 with c++14 in build_deps/toolchains/gpu/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl solved the issue. Just in case, I also replaced all c++11 with c++14 in build_deps/toolchains/gpu/crosstool/cc_toolchain_config.bzl.tpl. I see that CUDA 11 configuration files include C++14 rules. It can be good to add them also other CUDA configurations.

bhack commented 2 years ago

Have you checked https://github.com/tensorflow/addons/pull/2605 ?

girgink commented 2 years ago

I didn't see that, thanks.

bhack commented 2 years ago

Let me know if we could close this

girgink commented 2 years ago

Sorry for the delay. Yes #2605 is about the same issue, please feel free to close this.