Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#include "tsl/framework/numeric_types.h" is missing #61830

Closed
JanuszL opened this issue Sep 11, 2023 · 12 comments
Closed

#include "tsl/framework/numeric_types.h" is missing #61830

JanuszL opened this issue Sep 11, 2023 · 12 comments
Assignees
Labels
comp:core issues related to core part of tensorflow stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype:cpu-intel To track windows cpu issues type:bug Bug

Comments

@JanuszL
Copy link

JanuszL commented Sep 11, 2023

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

As above
@sachinprasadhs
Copy link
Contributor

@sachinprasadhs sachinprasadhs added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Oct 5, 2023
@JanuszL
Copy link
Author

JanuszL commented Oct 5, 2023

Hi @sachinprasadhs,

It seems to work now.

@sachinprasadhs
Copy link
Contributor

Thanks for confirming, could you pease close this issue.

@njzjz
Copy link
Contributor

njzjz commented Oct 29, 2023

I still got this error with 2.15.0rc0 on Windows. The package was installed using pip.

    C:/Users/runneradmin/AppData/Local/Temp/pip-build-env-csrgykur/normal/Lib/site-packages/tensorflow/include\tensorflow/core/framework/numeric_types.h(24,1): fatal error C1083: Cannot open include file: 'tsl/framework/numeric_types.h': No such file or directory [D:\a\deepmd-kit\deepmd-kit\build\py37-none-win_amd64\op\deepmd_op.vcxproj]
      Building Custom Rule D:/a/deepmd-kit/deepmd-kit/source/op/CMakeLists.txt
      cmake_pch.cxx
    C:/Users/runneradmin/AppData/Local/Temp/pip-build-env-csrgykur/normal/Lib/site-packages/tensorflow/include\tensorflow/core/framework/numeric_types.h(24,1): fatal error C1083: Cannot open include file: 'tsl/framework/numeric_types.h': No such file or directory [D:\a\deepmd-kit\deepmd-kit\build\py37-none-win_amd64\op\op_grads.vcxproj]

There are no errors on Linux and macOS, though.

@njzjz
Copy link
Contributor

njzjz commented Oct 29, 2023

There are no errors on Linux and macOS, though.

I checked the Linux wheel and the Windows wheel. The Linux wheel contains include/tsl and include/xla directories, but the Windows wheel doesn't.

@JanuszL
Copy link
Author

JanuszL commented Oct 30, 2023

This time I see:

fatal error: third_party/eigen3/unsupported/Eigen/CXX11/Tensor: No such file or directory
         23 | #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"```

@njzjz
Copy link
Contributor

njzjz commented Nov 3, 2023

I checked the Linux wheel and the Windows wheel. The Linux wheel contains include/tsl and include/xla directories, but the Windows wheel doesn't.

Hi @sachinprasadhs, this issue still exists in 2.15.0rc1. I know now Intel builds the Windows package. Is there some way to report to them?

@sachinprasadhs sachinprasadhs added the subtype:cpu-intel To track windows cpu issues label Nov 3, 2023
@sachinprasadhs
Copy link
Contributor

cc: @mraunak

@mraunak
Copy link
Contributor

mraunak commented Nov 29, 2023

Hi @njzjz and @sachinprasadhs, the above issue will be fixed and missing xla/tsl files will be available in the include folder in the next release TF 2.16.

@njzjz
Copy link
Contributor

njzjz commented Apr 30, 2024

the above issue will be fixed and missing xla/tsl files will be available in the include folder in the next release TF 2.16.

I confirm it has been fixed in TF 2.16.

github-merge-queue bot pushed a commit to deepmodeling/deepmd-kit that referenced this issue Apr 30, 2024
tensorflow/tensorflow#61830 got fixed.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Updated the TensorFlow version constraint for better compatibility on
Windows systems.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@mihaimaruseac
Copy link
Collaborator

Closing since it is fixed. Thank you for the confirmation

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:core issues related to core part of tensorflow stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype:cpu-intel To track windows cpu issues type:bug Bug
Projects
None yet
Development

No branches or pull requests

6 participants