Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.15
Custom code
Yes
OS platform and distribution
docker/tensorflow/tensorflow:nightly-gpu
Mobile device
no
Python version
3.11
Bazel version
NR
GCC/compiler version
NR
CUDA/cuDNN version
NR
GPU model and memory
NR
Current behavior?
Create test.cc
#include "tensorflow/core/framework/op.h"
compile it with flags provided by TensorFlow:
get_compile_flags():
['-I/usr/local/lib/python3.11/dist-packages/tensorflow/include', '-D_GLIBCXX_USE_CXX11_ABI=1', '--std=c++17', '-DEIGEN_MAX_ALIGN_BYTES=64']
get_link_flags():
['-L/usr/local/lib/python3.11/dist-packages/tensorflow', '-l:libtensorflow_framework.so.2']
Then
g++ test.cc -o /tmp/test.o -fPIC -I/usr/local/lib/python3.11/dist-packages/tensorflow/include -D_GLIBCXX_USE_CXX11_ABI=1 --std=c++17 -DEIGEN_MAX_ALIGN_BYTES=64 -L/usr/local/lib/python3.11/dist-packages/tensorflow -l:libtensorflow_framework.so.2 -O2```
The error
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/bfloat16.h:19,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:24,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:24,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
from test.cc:1:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/numeric_types.h:24:10: fatal error: tsl/framework/numeric_types.h: No such file or directory
24 | #include "tsl/framework/numeric_types.h"
### Standalone code to reproduce the issue
```shell
As above
Relevant log output
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.15
Custom code
Yes
OS platform and distribution
docker/tensorflow/tensorflow:nightly-gpu
Mobile device
no
Python version
3.11
Bazel version
NR
GCC/compiler version
NR
CUDA/cuDNN version
NR
GPU model and memory
NR
Current behavior?
Create test.cc
compile it with flags provided by TensorFlow:
get_compile_flags():
['-I/usr/local/lib/python3.11/dist-packages/tensorflow/include', '-D_GLIBCXX_USE_CXX11_ABI=1', '--std=c++17', '-DEIGEN_MAX_ALIGN_BYTES=64']get_link_flags():
['-L/usr/local/lib/python3.11/dist-packages/tensorflow', '-l:libtensorflow_framework.so.2']Then
In file included from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/bfloat16.h:19,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:24,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op_def_builder.h:28,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/full_type_inference_util.h:24,
from /usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:27,
from test.cc:1:
/usr/local/lib/python3.11/dist-packages/tensorflow/include/tensorflow/core/framework/numeric_types.h:24:10: fatal error: tsl/framework/numeric_types.h: No such file or directory
24 | #include "tsl/framework/numeric_types.h"
Relevant log output