PyTorch Profiling via Script¶
Note
This method is part of end-to-end profiling and does not need to be performed separately if end-to-end profiling has already been completed.
To trace specific portions of code in standalone Python scripts using PyTorch tracing tools, follow these steps:
-
Set the output directory.
-
Enable tracing in the script by instructing the LLM object to start and stop profiling.
Performing this procedure results in generating a *.pt.trace.json.gz file that can be opened using Perfetto.