speechbrain.utils.profiling module

Wrapper to handle PyTorch profiling and benchmarking.

Author:
  • Titouan Parcollet 2024

Summary

Functions:

prepare_profiler

Wrapper to create a PyTorch profiler to benchmark training of speechbrain.core.Brain instances.

Reference

speechbrain.utils.profiling.prepare_profiler(profile_warmup: int | None = 5, profile_steps: int | None = 5, logdir: str | None = 'tensorboard_logs') object[source]

Wrapper to create a PyTorch profiler to benchmark training of speechbrain.core.Brain instances. See torch.profiler.profile documentation for details (brief summary below).

Parameters:
  • profile_warmup (int) – Number of warmup step before starting to log.

  • profile_steps (int) – Number of steps to log after warmup.

  • logdir (str) – Path to the output folder of the logs.