Lightning-AI / Lightning-AI/lightning-thunder
[RFC] Propagate `torch.compile` options to fallback path
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
`thunder.dynamo.thunderfx` distinguishes torch.compile options from thunder.jit options in https://github.com/Lightning-AI/lightning-thunder/blob/e171edf7bf142d354efb9e2233cd225a13e7fd57/thunder/dynamo/compiler.py#L211-L228.
It however doesn't pass torch.compile options to `torch.compile` used by `ThunderCompilr` https://github.com/Lightning-AI/lightning-thunder/blob/e171edf7bf142d354efb9e2233cd225a13e7fd57/thunder/dynamo/compiler.py#L60-L108 so it could use `torch.compile` with the default options.
I have no idea if and how this potential discrepancy could matter so I just wanted to share
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in thunder/dynamo/compiler.py, comparing thunder.dynamo.thunderfx option handling around lines 211–228 with ThunderCompilr and its torch.compile call around lines 60–108. Determine whether torch.compile options need to reach the fallback path and how the discrepancy affects behavior. Done means the fallback uses the intended options, with the behavior verified against the existing compiler entry points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100