ml_dtypes.h:19:10: fatal error: 'ml_dtypes/include/float8.h' file not found
 @plopresti Please use compiler flags like -I/path/to/ml_dtypes/include or adjust project settings accordingly. Sometimes, build system caches can cause issues, please clean & rebuild your project, and let us know?
Thank you! @sushreebarsa

I normally use `-I/path/to/bazel-bin/tensorflow/include`. This has worked fine for years.

Starting with r2.15, I have to use `-I/path/to/bazel-bin/tensorflow/include -I/path/to/bazel-bin/tensorflow/include/_virtual_includes/float8/ml_dtypes/include -I/path/to/bazel-bin/tensorflow/include/_virtual_includes/int4/ml_dtypes/include`

...which is a bug introduced by https://github.com/tensorflow/tensorflow/commit/ef1ea4f5c5c36209b6bd56a99fdd71e5052f6d63. @cantonios Any chance you might take a look at this? The ml_dtypes change appears to have broken the `//tensorflow:install_headers` Bazel target. Hmm... I see, it's an an issue with the genrule, since TF's targets use an `include_prefix`.

Seems like an easy fix, we need to add the one line:
```
        d="$${d#_virtual_includes/*/}"
```
in the genrule to remove that prefix. @plopresti Could you please refer to the above comment and let us know the update?
Thank you! I have an internal change to fix the issue.  Should hopefully propagate before the end of the week and make it into the next release. 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/62866">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/62866">No</a>
 d="$${d#_virtual_includes/*/}" Will this be going into a 2.15.1 release at some point soon? > Will this be going into a 2.15.1 release at some point soon?

No, it's not a security fix, so will not be backported.  It will go into 2.16.

The header is somewhere in the folder structure, so there is currently a work-around. > No, it's not a security fix, so will not be backported.

Ah, didn't realize it was only security. Thought it would be for bugfix too.

-----

Do you know the rough timeline for 2.16? Looks like it made it into the 2.16 branch: https://github.com/tensorflow/tensorflow/commits/r2.16/?author=cantonios

timeline for that release is early march.  Releases come out about once a quarter.
### Issue type

Bug

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

Yes

### Source

source

### TensorFlow version

r2.15

### Custom code

Yes

### OS platform and distribution

Linux RedHat 9.3

### Mobile device

_No response_

### Python version

3.11

### Bazel version

6.4.0

### GCC/compiler version

12.1.1

### CUDA/cuDNN version

N/A

### GPU model and memory

N/A

### Current behavior?

Note: This is related to, but different from, https://github.com/tensorflow/tensorflow/issues/61121.

Steps to reproduce:

1. Build the `//tensorflow:install_headers` Bazel target.
2. Add `bazel-bin/tensorflow/include` (or a copy thereof) to your compiler's header search path (`-I/path/to/tensorflow/include`).
3. Try to compile any file that includes `tsl/platform/ml_dtypes.h` directly or indirectly.
4. Observe a compilation failure as there is no `ml_dtypes/include/float8.h`.

```
In file included from ./mysource.hh:37:
In file included from .../include/tensorflow/core/public/session.h:26:
In file included from .../include/tensorflow/core/framework/tensor.h:26:
In file included from .../include/tensorflow/core/framework/allocator.h:26:
In file included from .../include/tensorflow/core/framework/numeric_types.h:24:
In file included from .../include/tsl/framework/numeric_types.h:22:
In file included from .../include/tsl/platform/types.h:22:
.../include/tsl/platform/ml_dtypes.h:19:10: fatal error: 'ml_dtypes/include/float8.h' file not found
   19 | #include "ml_dtypes/include/float8.h"  // from @ml_dtypes
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```

Note that there is a `ml_dtypes/include/float8.h` under `_virtual_includes/float8`. So one work-around is to add that directory (and the neighboring `int4` directory) to the header search path. But this is clumsy and has never been necessary prior to r2.15. The `//tensorflow/install_headers` target has always created a usable stand-alone include tree.

The Python package's include tree has this fixed up somehow. But the `//tensorflow/install_headers` target needs an update.


### Standalone code to reproduce the issue

```shell
#include "tensorflow/core/public/session.h"
```


### Relevant log output

_No response_