Repository navigation
Description
Click to expand!
Issue Type
Build/Install
Have you reproduced the bug with TF nightly?
No
Source
source
Tensorflow Version
v2.12.0
Custom Code
Yes
OS Platform and Distribution
Linux Debian Bullseye
Mobile device
No response
Python version
3.9
Bazel version
5.3.0
GCC/Compiler version
gcc (Debian 10.2.1-6) 10.2.1 20210110
CUDA/cuDNN version
cuda_11.6.r11.6/compiler.31057947_0
GPU model and memory
RTX A4000
Current Behaviour?
bazel build --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_package
failed displaying following error messages
ERROR: /mnt/data/kentwork/src/AI/tensorflow/tensorflow/compiler/xla/stream_executor/cuda/BUILD:376:11: Compiling tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF bazel-out/k8-opt/bin/tensorflow/compiler/xla/stream_executor/cuda/_objs/cudnn_plugin/cuda_dnn.pic.d ... (remaining 141 arguments skipped)
In file included from bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_Operation.h:37,
from bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_OperationGraph.h:36,
from bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_Heuristics.h:31,
from bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend.h:101,
from tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:55:
bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_PointWiseDesc.h: In member function ‘int64_t cudnn_frontend::PointWiseDesc_v8::getPortCount() const’:
bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_PointWiseDesc.h:69:16: error: enumeration value ‘CUDNN_POINTWISE_RECIPROCAL’ not handled in switch [-Werror=switch]
69 | switch (mode) {
| ^
In file included from bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_OperationGraph.h:36,
from bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_Heuristics.h:31,
from bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend.h:101,
from tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:55:
bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_Operation.h: In member function ‘cudnn_frontend::Operation_v8&& cudnn_frontend::OperationBuilder_v8::build_pointwise_op()’:
bazel-out/k8-opt/bin/external/cudnn_frontend_archive/_virtual_includes/cudnn_frontend/third_party/cudnn_frontend/include/cudnn_frontend_Operation.h:354:16: error: enumeration value ‘CUDNN_POINTWISE_RECIPROCAL’ not handled in switch [-Werror=switch]
354 | switch (m_operation.pointwise_mode) {
| ^
cc1plus: some warnings being treated as errors
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
Standalone code to reproduce the issue
bazel build --config=cuda --config=mkl //tensorflow/tools/pip_package:build_pip_packageRelevant log output
No response
Activity
saurabhmj11 commentedon Apr 22, 2023
It looks like you are encountering a compilation error when building TensorFlow with Bazel on your Debian Bullseye system using CUDA and MKL. The error is related to a missing switch case in the cudnn_frontend library.
One possible solution to this issue is to update the cudnn_frontend library to a newer version that has the missing switch case. You can try updating the cudnn_frontend by running the following command:
arduino
Copy code
bazel build --config=cuda --config=mkl --config=monolithic //tensorflow/tools/pip_package:build_pip_package --incompatible_remove_native_http_archive=false
This command will build TensorFlow with CUDA, MKL, and the latest version of the cudnn_frontend library.
If updating the cudnn_frontend library doesn't solve the issue, you can try disabling the --config=mkl option when building TensorFlow with Bazel. You can do this by running the following command:
arduino
Copy code
bazel build --config=cuda //tensorflow/tools/pip_package:build_pip_package
This command will build TensorFlow with only CUDA and without MKL. This might help you to identify whether the issue is related to the MKL library or not.
If neither of these solutions works, you might want to provide more information such as the complete build log or the full error message to help us better understand the issue.
kentosho commentedon Apr 22, 2023
$ bazel build --config=cuda --config=mkl --config=monolithic //tensorflow/tools/pip_package:build_pip_package --incompatible_remove_native_http_archive=false
ERROR: --incompatible_remove_native_http_archive=false :: Unrecognized option: --incompatible_remove_native_http_archive=false
gives Unrecognized option error
I also tried removing --config mkl, which I can not get any improvement.
Shuolongbj commentedon Apr 24, 2023
#60362 FYI.
btw:
tensorflow V2.12.0 requires 8.6cuDNN and 11.8 CUDA
SuryanarayanaY commentedon Apr 25, 2023
Hi @kentosho ,
Please look at the tested configurations here. For Tf2.12 version the tested configurations are GCC-9.3.1 , CUDA-11.8,cuDNN-8.6. Can you please cross check with the tested configurations.
Also I would like to know the sequence of steps followed for build.Have you installed cuDNN as per instructions ? I am interested to know the sequence of steps followed by you for GPU setup with CUDA,cuDNN toolkit installations etc. Official instructions as per documentation mentioned here.
github-actions commentedon May 3, 2023
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.
kentosho commentedon May 6, 2023
compile suceeded for gcc-10.2.1 CUDA-11.8 cuDNN-8.9 with following patch
it might be a wired patch
SuryanarayanaY commentedon May 8, 2023
Hi @kentosho ,
This might be due to the fact that TF tested cuDNN version is 8.6 whereas you are trying to use different version 8.9 and hence the change in dependencies might be worked.
I assume you haven't checked with cuDNN-8.6 which is a tested configuration. If you have tested this but still fails please let us know. have you done the patch suitable for cuDNN-8.9 directly please let us know.
github-actions commentedon May 16, 2023
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.
kentosho commentedon May 18, 2023
I try to build with cuDNN 8.6 instead of cuDNN8.9 and sucssess to build with no error. Also, when using CuDNN 8.9, I had experienced an abnormal termination of python when running model.fit on sensorflow 2.12.0, but this phenomenon was fixed by using CuDNN 8.6.
google-ml-butler commentedon May 18, 2023
Are you satisfied with the resolution of your issue?
Yes
No
surak commentedon Jan 2, 2024
Is this a chatgpt reply?