-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
VecISA.__bool__ is very expensive (nearly a second) on startup #100378
Comments
The PR is drafted #101679. However, there still exists an open issue in CI |
I will optimze it after CppBuilder merged. |
@xuhancn is this resolved? |
No
in 0a1b3be |
Possable help on this issue. #124366 |
![]() The time is cost on ISA checker always need run the jit cpp build to compile check module. |
Fixes #100378 Original issue caused by startup dry compile need cost almost 1 second. This PR add compiler version info, isa build options and pytorch version info to the test binary path hash. So same compile, same isa and same pytorch can skip the dry compile. Local test: First time: <img width="1588" alt="image" src="https://github.com/pytorch/pytorch/assets/8433590/d0b83f5d-849e-4f37-9977-3b0276e5a5a5"> We need to compile all c++ modules and it cost 16.5s. Second time: <img width="1589" alt="image" src="https://github.com/pytorch/pytorch/assets/8433590/44f07fb0-5a15-4342-b0f6-dfe2c880b5d3"> We skipped dry compile due to the same isa fingerprint. It is only cost 0.36s. Pull Request resolved: #124602 Approved by: https://github.com/jgong5, https://github.com/ezyang
🐛 Describe the bug
VecISA currently requires compiling a cpp program to test for capabilities, similar to
./configure
. We do this compilation on every new process invocation, dissimilar to./configure
. After performing the capability query, we should cache it and reuse the cache entry. This will save us about 1s cold start time on CPU inductor.Versions
master
cc @msaroufim @bdhirsh @anijain2305 @zou3519 @chauhang @wconstab @soumith @ngimel
The text was updated successfully, but these errors were encountered: