Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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).