diff --git a/README.rst b/README.rst index 25c3f8d..affad00 100644 --- a/README.rst +++ b/README.rst @@ -64,6 +64,56 @@ the PyTorch container on `NVIDIA GPU Cloud (NGC) `_. The branch for this release is `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 ------------- diff --git a/docs/install.rst b/docs/install.rst index 52de334..c5e4a58 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -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 - \ No newline at end of file +.. include:: ../README.rst + :start-after: quick-install-start-marker-do-not-remove + :end-before: quick-install-end-marker-do-not-remove \ No newline at end of file diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 2eaa6ef..1443a79 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -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