deepview-profile


Namedeepview-profile JSON
Version 0.14.1 PyPI version JSON
download
home_pagehttps://github.com/CentML/DeepView.Profile
SummaryInteractive performance profiling and debugging tool for PyTorch neural networks.
upload_time2024-03-05 21:43:20
maintainer
docs_urlNone
authorCentML
requires_python>=3.7,<4.0
licenseApache-2.0
keywords pytorch neural networks debugger profiler
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![DeepView](https://raw.githubusercontent.com/CentML/DeepView.Profile/main/assets/deepview.png)
[![License](https://img.shields.io/badge/license-Apache--2.0-green?style=flat)](https://github.com/CentML/DeepView.Profile/blob/main/LICENSE)
![](https://img.shields.io/pypi/pyversions/deepview-profile.svg)
[![](https://img.shields.io/pypi/v/deepview-profile.svg)](https://pypi.org/project/deepview-profile/)

DeepView.Profile is a tool to profile and debug the training performance of [PyTorch](https://pytorch.org) neural networks.

- [Installation](#installation)
- [Usage example](#getting-started)
- [Development Environment Setup](#dev-setup)
- [Release History](#release-history)
- [Meta](#meta)
- [Contributing](#contributing)

<h2 id="installation">Installation</h2>

DeepView.Profile works with *GPU-based* neural networks that are implemented in [PyTorch](https://pytorch.org).

To run DeepView.Profile, you need:
- A system equipped with an NVIDIA GPU
- Python 3.7+
- 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](https://pytorch.org/get-started/locally/)
    ```NVIDIA GeForce RTX 3060 Ti with CUDA capability sm_86 is not compatible with the current PyTorch installation.
    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](https://packaging.python.org/en/latest/tutorials/installing-packages/#use-pip-for-installing)
```zsh
pip install deepview-profile
```

### Installation from source
```bash
git clone https://github.com/CentML/DeepView.Profile
cd DeepView.Profile
poetry install
poetry run deepview --help
```

<h2 id="getting-started">Usage example</h2>

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](docs/providers.md) 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](https://github.com/CentML/DeepView.Explore) plugin. Install the plugin in VSCode and run the profiling session to interactively profile your models.
```zsh
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](https://www.sqlite.org/) 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](docs/run-time-report.md) and [Memory Report Format](docs/memory-report.md) 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.

```zsh
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`.

```zsh
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`

```zsh
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

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

<h2 id="dev-setup">Development Environment Setup</h2>

From the project root, do
```zsh
poetry install
```

<h2 id="release-history">Release History</h2>

See [Releases](https://github.com/CentML/DeepView.Profile/releases)

<h2 id="meta">Meta</h2>

DeepView.Profile began as a research project at the [University of Toronto](https://web.cs.toronto.edu) in collaboration with [Geofrey Yu](mailto:gxyu@cs.toronto.edu), [Tovi Grossman](https://www.tovigrossman.com) and [Gennady Pekhimenko](https://www.cs.toronto.edu/~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](https://arxiv.org/pdf/2008.06798.pdf).

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

```bibtex
@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](LICENSE) and [NOTICE](NOTICE) for more information.

<h2 id="contributing">Contributing</h2>

Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with DeepView.Profile.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/CentML/DeepView.Profile",
    "name": "deepview-profile",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "pytorch,neural networks,debugger,profiler",
    "author": "CentML",
    "author_email": "support@centml.ai",
    "download_url": "https://files.pythonhosted.org/packages/8d/05/d24d51b2e6c1da6573433a68988d961c506f6f88fb8ab39d847e717f777f/deepview_profile-0.14.1.tar.gz",
    "platform": null,
    "description": "![DeepView](https://raw.githubusercontent.com/CentML/DeepView.Profile/main/assets/deepview.png)\n[![License](https://img.shields.io/badge/license-Apache--2.0-green?style=flat)](https://github.com/CentML/DeepView.Profile/blob/main/LICENSE)\n![](https://img.shields.io/pypi/pyversions/deepview-profile.svg)\n[![](https://img.shields.io/pypi/v/deepview-profile.svg)](https://pypi.org/project/deepview-profile/)\n\nDeepView.Profile is a tool to profile and debug the training performance of [PyTorch](https://pytorch.org) neural networks.\n\n- [Installation](#installation)\n- [Usage example](#getting-started)\n- [Development Environment Setup](#dev-setup)\n- [Release History](#release-history)\n- [Meta](#meta)\n- [Contributing](#contributing)\n\n<h2 id=\"installation\">Installation</h2>\n\nDeepView.Profile works with *GPU-based* neural networks that are implemented in [PyTorch](https://pytorch.org).\n\nTo run DeepView.Profile, you need:\n- A system equipped with an NVIDIA GPU\n- Python 3.7+\n- PyTorch 1.1.0+ with CUDA\n  - **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](https://pytorch.org/get-started/locally/)\n    ```NVIDIA GeForce RTX 3060 Ti with CUDA capability sm_86 is not compatible with the current PyTorch installation.\n    The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.\n    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/\n    ```\n- **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**\n\n### Installation from PyPi\n\nInstalling with [Pip](https://packaging.python.org/en/latest/tutorials/installing-packages/#use-pip-for-installing)\n```zsh\npip install deepview-profile\n```\n\n### Installation from source\n```bash\ngit clone https://github.com/CentML/DeepView.Profile\ncd DeepView.Profile\npoetry install\npoetry run deepview --help\n```\n\n<h2 id=\"getting-started\">Usage example</h2>\n\nTo 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](docs/providers.md) for more information.\n\nOnce your entry point file is ready, there are two ways to profile interactive profiling and standalone profiling.\n\n### Interactive Profiling\nInteractive profiling is done with VSCode with the [DeepView.Explore](https://github.com/CentML/DeepView.Explore) plugin. Install the plugin in VSCode and run the profiling session to interactively profile your models.\n```zsh\npython3 -m deepview_profile interactive\n```\n\n### Standalone Profiling\nStandalone 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](https://www.sqlite.org/) 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](docs/run-time-report.md) and [Memory Report Format](docs/memory-report.md) pages respectively.\n\nTo have DeepView.Profile perform run time profiling, you use the `deepview time`\nsubcommand. In addition to the entry point file, you also need to specify the\nfile where you want DeepView.Profile to save the run time profiling report using the\n`--output` or `-o` flag.\n\n```zsh\npython3 -m deepview_profile time entry_point.py --output my_output_file.sqlite\n```\n\nLaunching memory profiling is almost the same as launching run time profiling.\nYou just need to use `deepview memory` instead of `deepview time`.\n\n```zsh\npython3 -m deepview_profile memory entry_point.py --output my_output_file.sqlite\n```\n\nTo 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.\n\nIt 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`\n\n```zsh\npython3 -m deepview_profile analysis entry_point.py --all --exclude-source --output=complete_analysis.json \n```\n\n`--exclude-source` option allows not adding `encodedFiles` section to output, that is available for `--measure-breakdown` analysis\n\nor various combinations of optional analysis\n\n```zsh\npython3 -m deepview_profile analysis entry_point.py --measure-breakdown --measure-throughput --habitat-predict --measure-utilization --energy-compute --output=various_analysis.json\n```\n\n<h2 id=\"dev-setup\">Development Environment Setup</h2>\n\nFrom the project root, do\n```zsh\npoetry install\n```\n\n<h2 id=\"release-history\">Release History</h2>\n\nSee [Releases](https://github.com/CentML/DeepView.Profile/releases)\n\n<h2 id=\"meta\">Meta</h2>\n\nDeepView.Profile began as a research project at the [University of Toronto](https://web.cs.toronto.edu) in collaboration with [Geofrey Yu](mailto:gxyu@cs.toronto.edu), [Tovi Grossman](https://www.tovigrossman.com) and [Gennady Pekhimenko](https://www.cs.toronto.edu/~pekhimenko/).\n\nThe accompanying research paper appears in the proceedings of UIST'20. If you are interested, you can read a preprint of the paper [here](https://arxiv.org/pdf/2008.06798.pdf).\n\nIf you use DeepView.Profile in your research, please consider citing our paper:\n\n```bibtex\n@inproceedings{skyline-yu20,\n  title = {{Skyline: Interactive In-Editor Computational Performance Profiling\n    for Deep Neural Network Training}},\n  author = {Yu, Geoffrey X. and Grossman, Tovi and Pekhimenko, Gennady},\n  booktitle = {{Proceedings of the 33rd ACM Symposium on User Interface\n    Software and Technology (UIST'20)}},\n  year = {2020},\n}\n```\n\nIt is distributed under Apache 2.0 license. See [LICENSE](LICENSE) and [NOTICE](NOTICE) for more information.\n\n<h2 id=\"contributing\">Contributing</h2>\n\nCheck out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with DeepView.Profile.\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Interactive performance profiling and debugging tool for PyTorch neural networks.",
    "version": "0.14.1",
    "project_urls": {
        "Homepage": "https://github.com/CentML/DeepView.Profile",
        "Repository": "https://github.com/CentML/DeepView.Profile"
    },
    "split_keywords": [
        "pytorch",
        "neural networks",
        "debugger",
        "profiler"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f98e4c905d44bb40b6b9940db7edb8a2a543f3edd01a7bbe4235adc4abb0100",
                "md5": "88660e35d485f33a822a9a06f15d2642",
                "sha256": "7743446972a6cbfd86d6c75bcc9686ea30d23950df84614742eb84e2593b943d"
            },
            "downloads": -1,
            "filename": "deepview_profile-0.14.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88660e35d485f33a822a9a06f15d2642",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 96722,
            "upload_time": "2024-03-05T21:43:18",
            "upload_time_iso_8601": "2024-03-05T21:43:18.528380Z",
            "url": "https://files.pythonhosted.org/packages/8f/98/e4c905d44bb40b6b9940db7edb8a2a543f3edd01a7bbe4235adc4abb0100/deepview_profile-0.14.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d05d24d51b2e6c1da6573433a68988d961c506f6f88fb8ab39d847e717f777f",
                "md5": "8888d502dce084e427b11fc430b0ed76",
                "sha256": "effc0025647b0c12a5347389cf53a9f509f27f8ac366296f31d00f340e2dbab3"
            },
            "downloads": -1,
            "filename": "deepview_profile-0.14.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8888d502dce084e427b11fc430b0ed76",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 73196,
            "upload_time": "2024-03-05T21:43:20",
            "upload_time_iso_8601": "2024-03-05T21:43:20.836731Z",
            "url": "https://files.pythonhosted.org/packages/8d/05/d24d51b2e6c1da6573433a68988d961c506f6f88fb8ab39d847e717f777f/deepview_profile-0.14.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-05 21:43:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CentML",
    "github_project": "DeepView.Profile",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "deepview-profile"
}
        
Elapsed time: 0.20058s