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

Support torch.compile #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alihassanijr
Copy link
Member

@alihassanijr alihassanijr commented Oct 3, 2024

Adds torch.compile support for torch>=2.4.0 by refactoring the ops/functions python interface and optionally registering libnatten ops with torch.library instead of creating autograd ops.

More information on why all of these steps are necessary:
https://pytorch.org/tutorials/advanced/python_custom_ops.html

Fixes #89 .

TODOs:

  • verify torch.compile works without graph breaks
  • make registering with torch.library optional (forward mode AD still doesn't have an interface)
  • torch.compile unit tests
  • verify mixed precision still works with torch.library
  • verify training NAT/DiNAT with torch.compile is functional

@alihassanijr
Copy link
Member Author

This is on hold pending a resolution from pytorch/pytorch#137437.

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

Successfully merging this pull request may close these issues.

Support torch.compile
1 participant