DeepSpeed
4dc4aacf - fix(autotp): broadcast CPU copies in the TP input consistency check (#9179)

Commit
1 day ago
fix(autotp): broadcast CPU copies in the TP input consistency check (#9179) The one-off check that validates the dataloader inputs are identical across tensor-parallel ranks broadcast the inputs as-is, including device-resident tensors. A pickled device tensor keeps the device index of the sender process, so every other rank restored it onto the sender's device: one extra cross-device copy per tensor, which is a waste and can even cause deadlock on some accelerators. Send CPU copies instead, and compare each pair on the device the local side lives on, so the check needs no device copy at all. --------- Signed-off-by: guhangsong <guhangsong@baidu.com> Co-authored-by: guhangsong <guhangsong@baidu.com> Co-authored-by: Zhipeng Wang <zhipeng.rainbowserie@gmail.com>
Author
Parents
Loading