Lightning-AI / Lightning-AI/lightning-thunder
enable using python_callable without mapping symbols to their impls
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
Currently, we can't use python_callable if we want to retrace because it does half of transform for execution.
We should absolutely get a flag on python_callable for that because we have a workaround in Thunder quite often now (in thunder/core/transforms.py but also in the autograd.Function handling in jit_ext now).
(the ["output"] might not make this example trivial, but still).
https://github.com/Lightning-AI/lightning-thunder/blob/ea96657689ab3c60a41897fcd0be5d00e685a449/thunder/core/transforms.py#L1438-L1445
cc @apaz-cli
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced section of thunder/core/transforms.py and inspect the autograd.Function handling in jit_ext. Determine how python_callable currently performs transformation and what flag would preserve retracing without mapping symbols to implementations; done means the existing Thunder workaround is no longer needed and the behavior is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100