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=5, profile_steps=5, logdir='tensorboard_logs')[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.

Return type:

profiler