Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/li-js/gpu_memory_profiling
Profile the GPU memory usage of every line in a Pytorch code
https://github.com/li-js/gpu_memory_profiling
Last synced: 14 days ago
JSON representation
Profile the GPU memory usage of every line in a Pytorch code
- Host: GitHub
- URL: https://github.com/li-js/gpu_memory_profiling
- Owner: li-js
- Created: 2018-06-12T11:54:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T03:42:01.000Z (over 6 years ago)
- Last Synced: 2024-08-01T16:52:40.595Z (3 months ago)
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 82
- Watchers: 2
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gpu_memory_profiling
Profile the GPU memory usage of every line in a pytorch code## Example Usage
```bash
python example_mnist.py
```## Dependency
This code depends on [py3nvml](https://github.com/fbcotter/py3nvml). Pip install is available here:
```
pip install py3nvml
```Tested with pytorch version 0.4.0 and py3nvml verion 0.2.0
### Acknowledgement
The gpu_profile.py is a modified version of [this script](https://gist.github.com/MInner/8968b3b120c95d3f50b8a22a74bf66bc).The example_mnist.py is modified from [this script](https://github.com/pytorch/examples/blob/master/mnist/main.py).