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

Allow c++14 for nvcc #2605

Merged
merged 1 commit into from
Nov 16, 2021
Merged

Allow c++14 for nvcc #2605

merged 1 commit into from
Nov 16, 2021

Conversation

shkarupa-alex
Copy link
Contributor

Description

I've got an error related to c++14 support while building addons v0.15.0 with GPU support above tf 2.7.0

bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/framework/tensor_types.h(176): error: "auto" is not allowed here

bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/framework/tensor_types.h(176): error: pack expansion does not make use of any argument packs

bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/framework/tensor_types.h(177): error: pack expansion does not make use of any argument packs

3 errors detected in the compilation of "tensorflow_addons/custom_ops/seq2seq/cc/kernels/beam_search_ops_gpu.cu.cc".
ERROR: /home/alex/jupyter/build/addons/tensorflow_addons/custom_ops/seq2seq/BUILD:7:18: output 'tensorflow_addons/custom_ops/seq2seq/_objs/_beam_search_ops_gpu/beam_search_ops_gpu.cu.pic.o' was not created
ERROR: /home/alex/jupyter/build/addons/tensorflow_addons/custom_ops/seq2seq/BUILD:7:18: not all outputs were created or valid
Target //:build_pip_pkg failed to build

Fix

Could solve that by changing allowed c++ standards according to https://github.com/tensorflow/tensorflow/blob/v2.7.0/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl#L189

Type of change

Checklist:

  • I've properly formatted my code according to the guidelines
    • By running Black + Flake8
    • By running pre-commit hooks
  • This PR addresses an already submitted issue for TensorFlow Addons
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • This PR contains modifications to C++ custom-ops

How Has This Been Tested?

Build success tested locally

I've got an error related to c++14 support while building addons v0.15.0 with GPU support above tf 2.7.0

```bash
bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/framework/tensor_types.h(176): error: "auto" is not allowed here

bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/framework/tensor_types.h(176): error: pack expansion does not make use of any argument packs

bazel-out/k8-opt/bin/external/local_config_tf/include/tensorflow/core/framework/tensor_types.h(177): error: pack expansion does not make use of any argument packs

3 errors detected in the compilation of "tensorflow_addons/custom_ops/seq2seq/cc/kernels/beam_search_ops_gpu.cu.cc".
ERROR: /home/alex/jupyter/build/addons/tensorflow_addons/custom_ops/seq2seq/BUILD:7:18: output 'tensorflow_addons/custom_ops/seq2seq/_objs/_beam_search_ops_gpu/beam_search_ops_gpu.cu.pic.o' was not created
ERROR: /home/alex/jupyter/build/addons/tensorflow_addons/custom_ops/seq2seq/BUILD:7:18: not all outputs were created or valid
Target //:build_pip_pkg failed to build
```

Could solve that by changing allowed c++ standards according to https://github.com/tensorflow/tensorflow/blob/v2.7.0/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl#L189
@bhack bhack merged commit a3602ca into tensorflow:master Nov 16, 2021
@bhack
Copy link
Contributor

bhack commented Nov 16, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants