Lightning-AI / Lightning-AI/lightning-thunder

[benchmark_inference] Investigate why the first and last Dynamo subgraph are not wrapped with cuda graph regions

Open
#2,717 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

cudagraphs
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:

Image

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

  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/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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.