 Install error with clang compiler. CUDA device code does not support variadict functions.
Hi @ujjwalnur,

Could you please confirm whether you have used the flag `--config=cuda` and set **Y** to the `./configure` step `Do you wish to build TensorFlow with CUDA support?` while building? 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. I've been having this same issue trying to build from source. I did use the `--config=cuda` flag in my build statement and answered **Y** to the CUDA question in the `./configure` step. Here are the details for my system:

**Source:** latest
**Custom code:** no
**OS platform and distro:** Ubuntu 22.04
**Python version:** 3.10
**Bazel version:** 6.1.0
**Compiler version:** clang-16
**CUDA version:** 12.2.2
**cuDNN version:** 8.9.6
**GPU model:** RTX 3070 Hi, There is a similar issue open, till we resolve the issue, could you please follow nvcc instead of clang as per the comment here https://github.com/tensorflow/tensorflow/issues/62459#issuecomment-1830409296 Switching to the nvcc compiler worked. Was just able to get a successful build with CUDA. Thanks! Managed to build by adding `-copt=-Xclang --copt=-fcuda-allow-variadic-functions` following conversation in https://github.com/llvm/llvm-project/issues/58410 
### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

tf2.14

### Custom code

No

### OS platform and distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

clang-16

### CUDA/cuDNN version

CUDA 12.2 / CuDNN 8.9

### GPU model and memory

RTX 4090

### Current behavior?

TensorFlow install instructions recommend using Clang as the CUDA compiler. However, the build fails with the error 
**CUDA device code does not support variadic functions.**

I have found  on this [link](https://discourse.llvm.org/t/cuda-cuda-device-code-does-not-support-variadic-functions-in-clang/60481/2) that at least until 18 months ago, clang did not have general support for variadic functions.

Is that still the case ? I would suspect not because the official tensorflow website recommends using clang as the CUDA compiler. 

By the way, I am using clang-16 as shown on the official webpage

### Standalone code to reproduce the issue

```shell
bazel build //tensorflow/tools/pip_package:build_pip_package --verbose_failures
```


### Relevant log output

```shell
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/config.cuh:35:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/util_arch.cuh:38:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/util_macro.cuh:35:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/utility:18:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/utility:282:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/concepts:144:
bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/__concepts/boolean_testable.h:45:1: error: CUDA device code does not support variadic functions
_LIBCUDACXX_CONCEPT_FRAGMENT(
^
bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/__concepts/__concept_macros.h:197:8: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT'
      &_NAME##_LIBCUDACXX_CONCEPT_FRAGMENT_(...))[2] /**/
       ^
<scratch space>:67:1: note: expanded from here
__boolean_testable__LIBCUDACXX_CONCEPT_FRAGMENT_
^
In file included from tensorflow/core/kernels/sparse_slice_grad_op_gpu.cu.cc:23:
In file included from ./tensorflow/core/kernels/gpu_prim.h:20:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/block/block_load.cuh:39:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/block/../block/block_exchange.cuh:36:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/config.cuh:35:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/util_arch.cuh:38:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/util_macro.cuh:35:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/utility:18:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/utility:282:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/concepts:147:
bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/__concepts/common_with.h:53:1: error: CUDA device code does not support variadic functions
_LIBCUDACXX_CONCEPT_FRAGMENT(
^
bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/__concepts/__concept_macros.h:197:8: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT'
      &_NAME##_LIBCUDACXX_CONCEPT_FRAGMENT_(...))[2] /**/
       ^
<scratch space>:89:1: note: expanded from here
__common_type_exists__LIBCUDACXX_CONCEPT_FRAGMENT_
^
In file included from tensorflow/core/kernels/sparse_slice_grad_op_gpu.cu.cc:23:
In file included from ./tensorflow/core/kernels/gpu_prim.h:20:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/block/block_load.cuh:39:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/block/../block/block_exchange.cuh:36:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/config.cuh:35:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/util_arch.cuh:38:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cub/util_macro.cuh:35:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/utility:18:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/utility:282:
In file included from bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/concepts:147:
bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/__concepts/common_with.h:64:1: error: CUDA device code does not support variadic functions
_LIBCUDACXX_CONCEPT_FRAGMENT(
^
bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include/cuda/std/detail/libcxx/include/__concepts/__concept_macros.h:197:8: note: expanded from macro '_LIBCUDACXX_CONCEPT_FRAGMENT'
      &_NAME##_LIBCUDACXX_CONCEPT_FRAGMENT_(...))[2] /**/
       ^
<scratch space>:17:1: note: expanded from here
__common_type_constructible__LIBCUDACXX_CONCEPT_FRAGMENT_
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated when compiling for sm_89.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 170.866s, Critical Path: 157.02s
INFO: 1919 processes: 168 internal, 1751 local.
FAILED: Build did NOT complete successfully
```
