torch_simple_timing.utils#
Module Contents#
Functions#
Returns the number of processes in the current distributed training. |
|
Whether or not distributed training is initialized. |
|
Synchronizes: |
- torch_simple_timing.utils.get_world_size()[source]#
Returns the number of processes in the current distributed training. Defaults to 1 in the case of non-distributed training.
- Returns:
number of processes
- Return type:
int
- torch_simple_timing.utils.initialized()[source]#
Whether or not distributed training is initialized.
Falsewhen not initialized or not available.- Returns:
Distributed training is initialized.
- Return type:
bool
- torch_simple_timing.utils.synchronize()[source]#
Synchronizes:
nothing on CPU
per-GPU CUDA streams with
torch.cuda.synchronize()across all processes in distributed training with
torch.distributed.barrier()
- Return type:
None