Lightning-AI / Lightning-AI/lightning-thunder
`CUDAGraphExecutor` - limited to static graphs only
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
## 🐛 Bug
With https://github.com/Lightning-AI/lightning-thunder/pull/430 merged we enable the usage of `thunder.jit(..., use_cudagraphs=True)`. This makes sure that the forward callable is wrapped into `thunder.cudagraphs.CUDAGraphExecutor`. This executor, however, assumes a static structure of the code. We might consider `torch.cuda.make_graphed_callables` as a safer option.
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 at thunder.cudagraphs.CUDAGraphExecutor, which wraps the forward callable when thunder.jit(..., use_cudagraphs=True); reproduce a case with a non-static graph and inspect how the executor handles it. Compare that behavior with torch.cuda.make_graphed_callables and define tests showing that dynamic structures are handled safely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100