NOTE: You are currently on the r21.03 branch which tracks stabilization towards the release. This branch is not usable during stabilization.
Clone the git repository
$ git clone https://github.com/NVIDIA/PyProf.git
Navigate to the top level PyProf directory
Install PyProf
$ pip install .
Verify installation is complete with pip list
$ pip list | grep pyprof
Should display
pyprof 3.9.0
Add the following lines to the PyTorch network you want to profile:
import torch.cuda.profiler as profiler import pyprof pyprof.init()
Profile with NVProf or Nsight Systems to generate a SQL file.
$ nsys profile -f true -o net --export sqlite python net.py
Run the parse.py script to generate the dictionary.
$ python -m pyprof.parse net.sqlite > net.dict
Run the prof.py script to generate the reports.
$ python -m pyprof.prof --csv net.dict