Lightning-AI / Lightning-AI/lightning-thunder

import thunder tries to initialize all native executors

Open
#345 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

executors ux
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

`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 calls `get_executor` or `get_all_executor`.

https://github.com/Lightning-AI/lightning-thunder/blob/843b2c265ec335aa1406f3d5650324567b88bf78/thunder/__init__.py#L78

https://github.com/Lightning-AI/lightning-thunder/blob/843b2c265ec335aa1406f3d5650324567b88bf78/thunder/extend/__init__.py#L382-L388

cc @apaz-cli @carmocca @borda

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with thunder/__init__.py at the referenced line and thunder/extend/__init__.py around the referenced code. Inspect how get_executor and get_all_executor access native executors, then verify that importing thunder initializes only default executors while those calls load the others when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.