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

torch.einsum docs don't mention that opt_einsum must be installed separately #127109

Closed
bmillwood opened this issue May 24, 2024 · 1 comment
Closed
Assignees
Labels
module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@bmillwood
Copy link

bmillwood commented May 24, 2024

📚 The doc issue

Neither the torch.einsum doc page nor the torch.backends.opt_einsum page mentions the necessary / sufficient conditions to make the backend available.

Before I looked into it, I imagined that any of these things could be true (now I think they are all false):

  • opt_einsum is a hard dependency of pytorch,
  • the code in opt_einsum is just included into pytorch, so it's always available and it doesn't matter what package you have installed, but it might be out of date if opt_einsum does something new,
  • the optimizations will only apply if you import opt_einsum in your program
    • maybe even you have to import opt_einsum before you load torch, or before any of your other imports load it?

Suggest a potential alternative/fix

Mention that:

Minor bonus: the note in the einsum docs mentions torch.backends.opt_einsum, would be convenient if that note were a link

cc @svekars @brycebortree

@soulitzer
Copy link
Contributor

cc @janeyx99

@soulitzer soulitzer added module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 28, 2024
@janeyx99 janeyx99 self-assigned this Oct 8, 2024
janeyx99 added a commit that referenced this issue Oct 9, 2024
janeyx99 added a commit that referenced this issue Oct 9, 2024
ghstack-source-id: d7f94102f5eefc18bccba946aa3747f5db073d8e
Pull Request resolved: #137596
@janeyx99 janeyx99 linked a pull request Oct 9, 2024 that will close this issue
janeyx99 added a commit that referenced this issue Oct 9, 2024
janeyx99 added a commit that referenced this issue Oct 9, 2024
ghstack-source-id: ff8b1843cccbf187160f437abc5e03c67bb6dcbe
Pull Request resolved: #137596
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: docs Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants