Skip to content

wip: use torch from a wheel #9340

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rickeylev
Copy link
Contributor

@rickeylev rickeylev commented Jun 11, 2025

Using torch from a wheel will eliminate the ~20 minutes it takes to build from source.

A custom repo rule is used to replicate the structure that python_init_repositories
expects (a directory with a dist/ folder with a wheel) to add the whl file
into the requirements.txt files.

TODO:

  • Handle different builds (cuda, nightly, etc). There thousands of pytorch wheels.
    Unclear which combinations need to be pulled.

Work towards #9173

@bhavya01
Copy link
Collaborator

Thanks for looking into this. It will helpful for #9173

@rickeylev
Copy link
Contributor Author

Thanks! There's a couple questions I have that would help me figure out next steps:

  1. Can the ability to use a pytorch source checkout be removed entirely? It's easy to allow using a locally built wheel still.
  2. The ts_native_functions yaml and cpp files aren't in the wheel. Are the actually needed? From my local building, their absence hasn't resulted in any errors.
  3. Which versions and configurations of pytorch are needed? In order to use wheels, we'll need to specify them by URL (either via environment variables, or having a list in a .bzl file)

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.

2 participants