Commit Graph
2 Commits
Author SHA1 Message Date
Omar Sobh 623e6679d5 fix(rtx-distributed): ring_allreduce delegates to ProcessGroup for NCCL dispatch
ring_allreduce() contained its own simulation that multiplied each gradient
value by world_size (to fake an AllReduce sum), bypassing the ProcessGroup
dispatch entirely. This meant the overlapped synchronization path never used
NCCL or RNCCL, even when those features were compiled in.

Replace the hand-rolled simulation with a call to
self.process_group.allreduce(tensor, ReduceOp::Sum) so the overlapped path
uses the same backend as synchronize_gradients_sequential. The communication
latency sleep is kept for benchmarking purposes.

Add test_ring_allreduce_matches_sequential_path to verify both paths produce
identical gradient values under CPU simulation.

Closes #10
2026-05-02 05:58:10 -07:00
redclawsystems 4d88dc0584 Initial commit 2026-03-04 00:08:42 +00:00