torchfoo.ddp.make_module_ddp# torchfoo.ddp.make_module_ddp(m)[source]# Wrap a module with DDP and convert BatchNorm to SyncBatchNorm. Returns the module unchanged if not in distributed mode. Parameters: m (Module) – the module to wrap Returns: The DDP-wrapped module, or the original module if not distributed.