SingleDeviceStrategy¶
- class lightning.pytorch.strategies.SingleDeviceStrategy(device='cpu', accelerator=None, checkpoint_io=None, precision_plugin=None)¶
Bases:
StrategyStrategy that handles communication on a single device.
- all_gather(tensor, group=None, sync_grads=False)¶
Perform a all_gather on all processes.
- Return type:
- barrier(*args, **kwargs)¶
Synchronizes all processes which blocks processes until the whole group enters this function.
- broadcast(obj, src=0)¶
Broadcasts an object to all processes.
- reduce(tensor, *args, **kwargs)¶
Reduces a tensor from several distributed processes to one aggregated tensor. Since this strategy only operates with a single device, the reduction is simply the identity.