-
Notifications
You must be signed in to change notification settings - Fork 545
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for looking into this. It will helpful for #9173 |
Thanks! There's a couple questions I have that would help me figure out next steps:
|
f83237b
to
ff14b58
Compare
ff14b58
to
28d7dd1
Compare
I am also curious about which versions and configurations of pytorch will it pins to. Currently, the pytorch/xla assumes the HEAD of main. some features rely on the "unreleased" code (e.g. #8632 (comment)). pining |
|
Thanks for the info, @bhavya01 and @iwknow
Whichever you want, for the most part. We could probably have it automatically discover the latest nightlys and use those (I'm pretty sure, anyways; a bit more complicated but I think I see a way to do that).
oh hm, this is concerning for a couple reasons. First, it simply prevents saving the 20 minutes spent building torch in CI, which is about a third of the CI time. As a rule of thumb, waiting more than 10 minutes for presubmit checks is where productivity tends to plummet. The only other option is to fully bazelify torch itself -- possible in theory, but I'm skeptical of its feasibility in practice. Our experience building torch from source within Google has been hard and brittle (and my experience building torch from source outside google isn't much better); this is unsurprising given the size and complexity of torch. Second, if you're developing against torch head, then you're approximately locked to torch's release schedule. Which, seems like thats what you want to do as a project? ("Each stable torch-xla release depends on the corresponding stable torch release"). I just want to make clear that this makes for a tough route. The problem with head is torch is very active, so it's constantly changing and almost every CI run has to, essentially, start from scratch. Similarly, you, as developers, have to pay that same large tax to your run-edit flow and are disincentivized from syncing, nor obviously know when you must update torch or when you shouldn't update torch. On the infra side, it makes hopping in to address things harder because setup is complex and volatile. |
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 fileinto the requirements.txt files.
TODO:
Unclear which combinations need to be pulled.
Work towards #9173