Polygraphy is a toolkit designed to assist in running and debugging deep learning models in various frameworks. It includes a Python API, and several command-line tools built using this API.
NOTE: It is strongly recommended to install the colored
module for colored output
from Polygraphy, as this can greatly improve readability.
Each backend
directory includes a requirements.txt
file that specifies which packages
it depends on. You can install the requirements for whichever backends you're interested in
using:
python3 -m pip install -r polygraphy/backend/<name>/requirements.txt
python3 -m pip install nvidia-pyindex
python3 -m pip install polygraphy
make install
Or, if installing inside a virtual environment:
make install_venv
- Build a wheel:
python3 setup.py bdist_wheel
- Install the wheel manually from outside the repository:
python3 -m pip install polygraphy/dist/polygraphy-X.Y.Z-py2.py3-none-any.whl --user
where X.Y.Z
is the version number.
Polygraphy includes a command-line interface, polygraphy
, which provides various tools.
For usage information, run polygraphy --help
For details on the various tools included in the Polygraphy toolkit, see the tools directory.
For examples of both the CLI and Python API, see the examples directory.
For details on the Polygraphy Python API, see the API directory.
To view documentation about a specific class or function, you can view the
docstring with Python's help()
function.
To build the API documentation, first install required packages:
python3 -m pip install -r docs/requirements.txt
and then use the make
target to build docs:
make docs
The HTML documentation will be generated under build/docs
To view the docs, open build/docs/index.html
in a browser or HTML viewer.
For information on how you can contribute to this project, see CONTRIBUTING.md