Skip to content

40% build speedup: get torch and python include paths without subprocesses #119

Open
technillogue wants to merge 1 commit intoHazyResearch:mainfrom
technillogue:no-setup-subprocess
Open

40% build speedup: get torch and python include paths without subprocesses #119
technillogue wants to merge 1 commit intoHazyResearch:mainfrom
technillogue:no-setup-subprocess

Conversation

@technillogue
Copy link

@technillogue technillogue commented May 7, 2025

Starting python and importing torch is slow. Calling python in a subprocess could potentially be useful if the python environment changes while setup.py is running, but I don't think that can actually happen.

Timing python3 setup.py build, before this change:
real 1m1.822s
user 1m38.202s
sys 0m9.250s

real 1m2.285s
user 1m38.653s
sys 0m9.281s

After:
real 0m58.403s
user 0m58.709s
sys 0m7.626s

real 0m58.840s
user 1m19.693s
sys 0m8.612s

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.

1 participant