-
Notifications
You must be signed in to change notification settings - Fork 65
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
import thunder tries to initialize all native executors #345
Comments
lightning-thunder/thunder/extend/__init__.py Lines 354 to 366 in b1f4470
None for executors that are importable.
One simple fix could be avoiding Still in the long-term, Thunder would benefit from having a cheap way for executors to register themselves in a way that signals "I could be imported". And a different and more expensive check for "I can actually be used (dependencies are available, required hardware is available, ...)" |
triage review — adding a system that lets executors register themselves as "importable" would be a great extensibility point and should avoid actually importing everything at startup |
@ptrblck points out that importing thunder takes significantly longer than importing torch alone; this could be part of that issue
|
import thunder
initializes all native executors. I don't think this is desirable as initializing them may not be cheap. Except for default executors, we should load others only when user callsget_executor
orget_all_executor
.lightning-thunder/thunder/__init__.py
Line 78 in 843b2c2
lightning-thunder/thunder/extend/__init__.py
Lines 382 to 388 in 843b2c2
cc @apaz-cli @carmocca @Borda
The text was updated successfully, but these errors were encountered: