Profiling your PyTorch Module ------------ **Author:** `Suraj Subramanian ` PyTorch includes a profiler API that is useful to identify the time and memory costs of various PyTorch operations in your code. Profiler can be easily integrated in your code, and the results can be printed as a table or returned in a JSON trace file. .. note:: Profiler supports multithreaded models. Profiler runs in the same thread as the operation but it will also profile child operators that might run in another thread. Concurrently-running profilers will be scoped to their own thread to prevent mixing of results. .. note:: PyTorch 1.8 introduces the new API that will replace the older profiler API in the future releases. Check the new API at `this page <https://pytorch.org/docs/master/profiler.html>`__. Head on over to `this recipe <https://pytorch.org/tutorials/recipes/recipes/profiler_recipe.html>`__ for a quicker walkthrough of Profiler API usage.
Tasks: Profiling, Deep Learning Fundamentals
Task Categories: Deep Learning Fundamentals