Skip to main content

Interactive performance profiling and debugging tool for PyTorch neural networks.

Project description

DeepView License

DeepView.Profile is a tool to profile and debug the training performance of PyTorch neural networks.

Installation

DeepView.Profile works with GPU-based neural networks that are implemented in PyTorch.

To run DeepView.Profile, you need:

  • A system equipped with an NVIDIA GPU
  • Python 3.9+
  • PyTorch 1.1.0+ with CUDA
    • NOTE: We assume you have the correct version of PyTorch installed for their GPU. Default PyTorch installation on Linux distros might not have CUDA support. If you see error similar to below, your PyTorch version is incompatible with your version of CUDA. You can download the appropriate version from the PyTorch site
      The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
      If you want to use the NVIDIA GeForce RTX 3060 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
      
  • For new RTX 4000 GPUs you need to install pytorch with cuda11.8 [pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118] otherwise CUPTI will not initialize correctly

Installation from PyPi

Installing with Pip

pip install deepview-profile

Installation from source

git clone https://github.com/CentML/DeepView.Profile
cd DeepView.Profile
poetry install
poetry run deepview --help

Usage example

To use DeepView.Profile in your project, you need to first write an entry point file, which is a regular Python file that describes how your model is created and trained. See the Entry Point for more information.

Once your entry point file is ready, there are two ways to profile interactive profiling and standalone profiling.

Interactive Profiling

Interactive profiling is done with VSCode with the DeepView.Explore plugin. Install the plugin in VSCode and run the profiling session to interactively profile your models.

python3 -m deepview_profile interactive

Standalone Profiling

Standalone profiling is useful when you just want access to DeepView.Profile's profiling functionality. DeepView.Profile will save the profiling results (called a "report") into a SQLite database file that you can then query yourself. We describe the database schema for DeepView.Profile's run time and memory reports in the Run Time Report Format and Memory Report Format pages respectively.

To have DeepView.Profile perform run time profiling, you use the deepview time subcommand. In addition to the entry point file, you also need to specify the file where you want DeepView.Profile to save the run time profiling report using the --output or -o flag.

python3 -m deepview_profile time entry_point.py --output my_output_file.sqlite

Launching memory profiling is almost the same as launching run time profiling. You just need to use deepview memory instead of deepview time.

python3 -m deepview_profile memory entry_point.py --output my_output_file.sqlite

To export various available analysis to json file, you may use deepview analysis --all command for exact entry point and output file. It is required to later view the analysis on the web viewer.

It is also possible to run several optional analysis. There are such analysis available: --measure-breakdown, --measure-throughput, --habitat-predict, --measure-utilization, --energy-compute, --exclude-source

python3 -m deepview_profile analysis entry_point.py --all --exclude-source --output=complete_analysis.json 

--exclude-source option allows not adding encodedFiles section to output, that is available for --measure-breakdown analysis

or various combinations of optional analysis

python3 -m deepview_profile analysis entry_point.py --measure-breakdown --measure-throughput --habitat-predict --measure-utilization --energy-compute --output=various_analysis.json

Development Environment Setup

From the project root, do

poetry install

Release History

See Releases

Meta

DeepView.Profile began as a research project at the University of Toronto in collaboration with Geofrey Yu, Tovi Grossman and Gennady Pekhimenko.

The accompanying research paper appears in the proceedings of UIST'20. If you are interested, you can read a preprint of the paper here.

If you use DeepView.Profile in your research, please consider citing our paper:

@inproceedings{skyline-yu20,
  title = {{Skyline: Interactive In-Editor Computational Performance Profiling
    for Deep Neural Network Training}},
  author = {Yu, Geoffrey X. and Grossman, Tovi and Pekhimenko, Gennady},
  booktitle = {{Proceedings of the 33rd ACM Symposium on User Interface
    Software and Technology (UIST'20)}},
  year = {2020},
}

It is distributed under Apache 2.0 license. See LICENSE and NOTICE for more information.

Contributing

Check out CONTRIBUTING.md for more information on how to help with DeepView.Profile.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepview_profile-0.14.5.tar.gz (76.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepview_profile-0.14.5-py3-none-any.whl (100.6 kB view details)

Uploaded Python 3

File details

Details for the file deepview_profile-0.14.5.tar.gz.

File metadata

  • Download URL: deepview_profile-0.14.5.tar.gz
  • Upload date:
  • Size: 76.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for deepview_profile-0.14.5.tar.gz
Algorithm Hash digest
SHA256 2a77bd07ba998343bcd1508e28d27cf1f76499635df8db038680058bcebad7ea
MD5 2b5f9a4641f388553b8cb474b5a2b717
BLAKE2b-256 373eef7ea720cb7046c101f5f5de106546a336bd70d3d855a41131b7720c1394

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepview_profile-0.14.5.tar.gz:

Publisher: build-and-publish-new-version.yml on CentML/DeepView.Profile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deepview_profile-0.14.5-py3-none-any.whl.

File metadata

File hashes

Hashes for deepview_profile-0.14.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bee14504aca0ee5e671d45294dd0255a417662323698bfbff35758e80b338a4e
MD5 91325447c0eafe6617bc8351b2e698cd
BLAKE2b-256 48e33ba0fd7c02133c8a74814561718a70e610aeeea7cde8d5340856e3bc3ebb

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepview_profile-0.14.5-py3-none-any.whl:

Publisher: build-and-publish-new-version.yml on CentML/DeepView.Profile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page