Skip to content

Latest commit

 

History

History
 
 

Polygraphy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Polygraphy: A Deep Learning Inference Prototyping and Debugging Toolkit

Table of Contents

Introduction

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.

Installation

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

Install From Package Index

python3 -m pip install nvidia-pyindex
python3 -m pip install polygraphy

Building From Source

Using Make Targets

make install

Or, if installing inside a virtual environment:

make install_venv

Building Manually

  1. Build a wheel:
python3 setup.py bdist_wheel
  1. 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.

Usage

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.

Examples

For examples of both the CLI and Python API, see the examples directory.

Advanced

Using The API

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.

Building API Docs

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.

Contributing

For information on how you can contribute to this project, see CONTRIBUTING.md