torchtnt.utils.timer.get_synced_timer_histogram¶
-
torchtnt.utils.timer.
get_synced_timer_histogram
(timer: TimerProtocol, percentiles: Sequence[float], pg: Optional[ProcessGroup] = None) Dict[str, Dict[str, float]] ¶ Synchronizes the input timer’s recorded durations across ranks.
Parameters: - timer – The TimerProtocol object whose recorded durations will be synced.
- percentiles – The percentiles to compute. Values should be in the range [0, 100].
- pg (optional) – The process group to use for synchronization. Defaults to the global process group.
Returns: A dictionary mapping the action names to a dictionary of the computed percentiles, along with the mean duration of each action.
Raises: ValueError – If the input percentiles are not in the range [0, 100].