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

Make custom ops compatible with torch.compile #8890

Open
akihironitta opened this issue Feb 9, 2024 · 0 comments
Open

Make custom ops compatible with torch.compile #8890

akihironitta opened this issue Feb 9, 2024 · 0 comments

Comments

@akihironitta
Copy link
Member

🚀 The feature, motivation and pitch

The PyTorch team has recently released a guide [1] to making custom C++ ops compatible with torch.compile. Although the API is still at an early stage, we can start exploring whether we can make custom ops in PyG's optional libraries, such as pyg-lib, and giving feedbacks to PyTorch as necessary.

Currently, we handle the imcompatibility issue by falling back to (slow) equivalent operations written in pure PyTorch where possible (like this previously or like this in PyG 2.5.0+)

Refs:

  1. [GUIDE] Getting C++ custom ops to work with torch.compile - PyTorch Dev Discussion
  2. The C++ Custom Operators Manual - Google Docs
  3. The dynamic shapes manual - Google Docs
  4. [dynamo] Investigate interop issues with torch_scatter/torch_sparse/pyg_lib pytorch/pytorch#111223

Alternatives

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant