TF 2.12 Failing to Build for ROCm - missing dependency declarations
Looks like the `third_party/gpus/rocm_configure.bzl` file does not include a path for clang 16.0.0. I have manually included it now. Will report back whether this allows it to compile successfully. If not, downgrading to clang 15.0.0 (which has probably been tested since it's already defined) is probably the solution. 

Hi @Mushoz, Apologies for the delay.
As it is tested with clang 15.0.0 as mentioned [here](https://github.com/tensorflow/tensorflow/blob/v2.12.0/third_party/gpus/rocm_configure.bzl), it is recommended to use the tested configurations. Please confirm if the issue is resolved. Thank you! @synandi Sorry for not reporting back earlier! I do confirm adding the path to clang 16.0.0 fixes the issue. It also compiles successfully, so I did not have to downgrade to clang 15.0.0.  Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60538">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60538">No</a>
 > @synandi Sorry for not reporting back earlier! I do confirm adding the path to clang 16.0.0 fixes the issue. It also compiles successfully, so I did not have to downgrade to clang 15.0.0.

@Mushoz  It's already merged in the latest TF, thanks a lot for the issue!

https://github.com/tensorflow/tensorflow/commit/c97cec76fc145c25543b0e7545d5ea3ad4f8e764
https://github.com/openxla/xla/pull/2972 How do you add the path? Can you teach me? Thank you very much Hi @s1mplezpc AMD has its own Tensorflow repo https://github.com/ROCm/tensorflow-upstream and we have [build script](https://github.com/ROCm/tensorflow-upstream/blob/develop-upstream/build_rocm_python3#L33) and you can change the ROCm version here https://github.com/ROCm/tensorflow-upstream/blob/develop-upstream/build_rocm_python3#L33
<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

tf 2.12

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.10.6

### Bazel version

5.3.0

### GCC/Compiler version

Clang 16.0

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

The Bazel build is failing. It is complaining about missing dependency declarations, yet the files mentioned do exist just fine. I have reproduced the issue in a Dockerfile to make it reproducable (see below).

### Standalone code to reproduce the issue

Building this Dockerfile should show the error:

```shell

FROM ubuntu

RUN apt update

RUN apt install sudo -y
RUN useradd -m tensorflow-rocm -g sudo
RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
USER tensorflow-rocm
WORKDIR /home/tensorflow-rocm

RUN sudo apt update
RUN sudo apt install apt-transport-https curl gnupg -y
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
RUN sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list

RUN sudo apt update && sudo apt install bazel-5.3.0 -y
RUN sudo ln -s /usr/bin/bazel-5.3.0 /usr/bin/bazel

RUN sudo apt install wget
RUN wget https://repo.radeon.com/amdgpu-install/5.5/ubuntu/jammy/amdgpu-install_5.5.50500-1_all.deb
RUN sudo apt-get install ./amdgpu-install_5.5.50500-1_all.deb -y
RUN sudo amdgpu-install --usecase=rocm --no-dkms -y

RUN sudo apt install python3-dev python3-pip -y
RUN pip install -U --user pip numpy wheel packaging requests opt_einsum
RUN pip install -U --user keras_preprocessing --no-deps
RUN sudo ln -s /usr/bin/python3 /usr/bin/python
RUN sudo apt install patchelf -y

RUN sudo apt install git -y 
RUN git clone https://github.com/tensorflow/tensorflow.git
WORKDIR /home/tensorflow-rocm/tensorflow
RUN git checkout v2.12.0

ENV TF_NEED_ROCM=1
ENV TF_ROCM_AMDGPU_TARGETS=gfx900
ENV ROCM_PATH=/opt/rocm-5.5.0
ENV PYTHON_BIN_PATH=/usr/bin/python3
RUN ./configure
RUN bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures
```



### Relevant log output

```shell
ERROR: /home/tensorflow-rocm/tensorflow/tensorflow/compiler/xla/stream_executor/rocm/BUILD:406:11: Compiling tensorflow/compiler/xla/stream_executor/rocm/rocm_helpers.cu.cc failed: undeclared inclusion(s) in rule '//tensorflow/compiler/xla/stream_executor/rocm:rocm_helpers':
this rule is missing dependency declarations for the following files included by 'tensorflow/compiler/xla/stream_executor/rocm/rocm_helpers.cu.cc':
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/__clang_hip_runtime_wrapper.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/stddef.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/__clang_hip_libdevice_declares.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/__clang_hip_math.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/cuda_wrappers/algorithm'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/cuda_wrappers/new'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/limits.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/stdint.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/__clang_cuda_math_forward_declares.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/__clang_hip_cmath.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/__clang_cuda_complex_builtins.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/cuda_wrappers/complex'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/__stddef_max_align_t.h'
  '/opt/rocm-5.5.0/llvm/lib/clang/16.0.0/include/stdarg.h'
clang-16: warning: argument unused during compilation: '-fcuda-flush-denormals-to-zero' [-Wunused-command-line-argument]
Target //tensorflow/tools/pip_package:build_pip_package failed to build
```

</details>