Lightning-AI / Lightning-AI/lightning-thunder
Transform to skip distributed collective ops when `group.size() == 1`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
🚀 Feature
As per title. It'd make sense to have a trace transformation that skip distributed collective ops if the number of processes residing in a group is 1.
Motivation
Pitch
Alternatives
It'd be equivalent to have this logic inside of ltorch definitions to check the world size and return tensor w/o calling dist_prims
Additional context
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 by inspecting the trace transformation entry points and the ltorch definitions mentioned in the issue, then trace how distributed collective operations reach dist_prims. Determine which collectives should be skipped when group.size() == 1 and how the unchanged tensor result should be represented. Done means the transformation handles the intended collectives without invoking them for singleton groups and has coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- compilers, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100