179 questions
No questions match those filters.
How does DDP overlap gradient communication with the ba...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansDDP optimizes synchronization by grouping parameters into buckets (defaulting to 25 MB). As the backward pass computes gradients, the hook for the last parameter in a bucket triggers an asynchronous all_reduce for that entire bucket. This allows communication to occur concurrently with the computation of earlier-layer gradients. However, this overlap is limited because the final bucket on the critical path must complete its all_reduce before the optimizer step can begin. If a model has very few parameters per layer, the buckets may serialize, causing the overlap to collapse.