Hi the pytorch profiler might be beneficial to you torch.profiler — PyTorch 1.9.0 documentation 1. Also you can use the trace functionality to identify bottlenecks in your code PyTorch Profiler — PyTorch Tutorials 1.9.0+cu102 documentation.