SyncBN raise ERROR when count = 1
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.5k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 3
Description
It is right that BN layer in torch.nn raises error when count = 1 (only 1 value per channel).
However, for SyncBN layer, even that count = 1 for one GPU, it should NOT raise the error when mean and var are synchronized across multiple GPUs.
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 the count check at lines 29–30 of apex/parallel/optimized_sync_batchnorm_kernel.py and trace how SyncBN synchronizes mean and variance across GPUs. Reproduce the count=1-per-GPU case, then verify that the error is avoided when the synchronized aggregate has enough values while the single-value case remains rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100