Skip to content

Commit

Permalink
Update README to include install and usage instructions (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzier authored Aug 7, 2020
1 parent 44e79bc commit 60fb0cd
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 36 deletions.
50 changes: 50 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,56 @@ the PyTorch container on `NVIDIA GPU Cloud (NGC) <https://ngc.nvidia.com>`_. The
branch for this release is `r20.07
<https://github.com/NVIDIA/PyProf/tree/r20.07>`_.

Quick Installation Instructions
-------------------------------

.. quick-install-start-marker-do-not-remove
* 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.3.0.dev0

.. quick-install-end-marker-do-not-remove
Quick Start Instructions
------------------------

.. quick-start-start-marker-do-not-remove
* 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

.. quick-start-end-marker-do-not-remove
Documentation
-------------

Expand Down
21 changes: 3 additions & 18 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,6 @@ PyProf is available from GitHub.
Installing from GitHub
----------------------

* 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.3.0.dev0
.. include:: ../README.rst
:start-after: quick-install-start-marker-do-not-remove
:end-before: quick-install-end-marker-do-not-remove
21 changes: 3 additions & 18 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,6 @@ for details on how to install from GitHub
Profile with PyProf
-------------------

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

.. include:: ../README.rst
:start-after: quick-start-start-marker-do-not-remove
:end-before: quick-start-end-marker-do-not-remove

0 comments on commit 60fb0cd

Please sign in to comment.