Skip to content

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

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

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

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

@technillogue technillogue force-pushed the no-setup-subprocess branch from 40899ea to 97b1e47 Compare May 7, 2025 22:22
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