Lightning-AI / Lightning-AI/pytorch-lightning
Total time in Simpleprofiler does not add up to the function run-times
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
Bug description
Used the SimpleProfiler while training a model with DDP, and found that the constituent times of the functions did not add up to the total. Is this a bug?
Alternatively, do these calls each represent one GPU's worth of profiling? Like, should I multiply each of the function calls by my number of GPU's (4 in this case) to get a better estimate?
Alternatively alternatively, should I view the bulk of the 'total time' as the 'cost' of the DDP spin-up? If so, should this be documented somewhere?
cc @carmocca @kaushikb11 @ninginthecloud @rohitgr7 @nbcsm @guotuofeng
Contributor guide
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
No file or test is named. Start by reproducing the report with SimpleProfiler during DDP training, comparing total and constituent function times across the four GPUs. Done means determining whether the discrepancy is a profiling bug, expected DDP behavior, or missing documentation, then identifying the relevant project entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- distributed-systems, machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100