Lightning-AI / Lightning-AI/lightning-thunder
[benchmark_inference] Investigate why the first and last Dynamo subgraph are not wrapped with cuda graph regions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
From the nsys profiles is visible how 4 dynamo subgraphs are generated but only 2 of them are launched with CUDA Graph:
For reference refer to this doc: https://docs.google.com/document/d/1iv8-ujpih7hScQd90nhrl30xJ4D7Q7fRS2hdKuYfu3E/edit?tab=t.0
Repro:
```bash
python thunder/benchmarks/benchmark_inference.py --input-length 4096 --output-length 4 --mode thunder --enable-nv-linear --warmup-iterations 2 --num-iterations 2 --enable-thunder-cudagraph
```
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 thunder/benchmarks/benchmark_inference.py and run the provided benchmark command, then inspect the nsys profile and the linked reference document. Trace how the four Dynamo subgraphs are launched with CUDA Graphs and document why the first and last are excluded; done means the cause and any required change are verified by a profile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100