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

Two missing header files in package list. #68876

Closed
cchheennhhaaoo opened this issue Nov 24, 2021 · 8 comments
Closed

Two missing header files in package list. #68876

cchheennhhaaoo opened this issue Nov 24, 2021 · 8 comments
Assignees
Labels
module: cpp Related to C++ API needs design triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@cchheennhhaaoo
Copy link
Contributor

cchheennhhaaoo commented Nov 24, 2021

Hi,

We have registered a backend of pytorch and maintain a framework based on it. When building our framework, we found 2 header files are missing which may cause building failed.

  1. "include/torch/csrc/generic/*.h" is not in package list while "include/torch/csrc/*.h" is in. It may cause error when using "include/torch/csrc/Storage.h" since it requires "include/torch/csrc/generic/Storage.h".
  2. "torch/csrc/distributed/rpc/*.h" is also not in package list, it may cause error when using "./torch/csrc/jit/python/pybind_utils.h" since this file includes "torch/csrc/distributed/rpc/py_rref.h".

Could you please add "include/torch/csrc/generic/*.h" and "torch/csrc/distributed/rpc/*.h" to package list in setup.py?

cc @malfet @seemethere @jbschlosser

@ejguan ejguan added module: cpp Related to C++ API triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module oncall: releng In support of CI and Release Engineering labels Nov 24, 2021
@malfet malfet added module: build Build system issues and removed oncall: releng In support of CI and Release Engineering labels Nov 24, 2021
@malfet
Copy link
Contributor

malfet commented Nov 24, 2021

Removing releng and module: build labels and adding "needs design"
"torch/csrc/Storage.h" depends on "torch/csrc/generic/Storage.h" at least since 1.4

So perhaps the better solution would be not export Storage.h, as it looks like an internal, rather than public header

@malfet malfet added this to Needs Triage in PyTorch Dev Infra Backlog via automation Nov 24, 2021
@malfet malfet self-assigned this Nov 24, 2021
@malfet malfet added needs design and removed module: build Build system issues labels Nov 24, 2021
@chengjunlu
Copy link
Contributor

So perhaps the better solution would be not export Storage.h, as it looks like an internal, rather than public header

Even with the untyped storage #62030, the extension still need to register the inter-op for ByteStorage of different backend. Like: The THPInsertStorageCopyFunction API.

Or there is other way for the extension for the same purpose?

@seemethere seemethere moved this from Needs Triage to Backlog in PyTorch Dev Infra Backlog Mar 4, 2022
@chengjunlu
Copy link
Contributor

@malfet
The latest pytorch has refactor the THP Storage to the untyped storage.
But the untyped storage (legacy ByteStorage) still has some coupled code in CUDA and CPU.
Do you think it is possible to decouple the code further and reuse the code for other backend extension out tree?

By doing so we can remove all the legacy things in generic/*

@cchheennhhaaoo
Copy link
Contributor Author

Hi, @malfet, any suggestion about @chengjunlu's comments?

@cchheennhhaaoo
Copy link
Contributor Author

@malfet @ejguan Could someone help with it?

@chengjunlu
Copy link
Contributor

chengjunlu commented Jun 20, 2022

Hi all,
After investigate the latest pytorch. All the missed header issue has been solved. No longer need this requirements.
@cchheennhhaaoo Please close this.

Thanks
John

@access2rohit
Copy link

I am also facing this issues while linking using libtorch-1.12.1

torch/include/torch/csrc/jit/python/pybind_utils.h:29:10: fatal error: torch/csrc/distributed/rpc/py_rref.h: No such file or directory

Any updates on when this will be fixed ?

@chengjunlu
Copy link
Contributor

I am also facing this issues while linking using libtorch-1.12.1

torch/include/torch/csrc/jit/python/pybind_utils.h:29:10: fatal error: torch/csrc/distributed/rpc/py_rref.h: No such file or directory

Any updates on when this will be fixed ?

This issue seems fixed in master pytorch. Maybe available in pytorch 1.13.

PyTorch Dev Infra Backlog automation moved this from Backlog to Done Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cpp Related to C++ API needs design triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Development

No branches or pull requests

5 participants