Install from PyPI
The simplest way to install GPU Memory Profiler is from PyPI:The base installation includes core profiling functionality for both PyTorch and TensorFlow. Framework-specific and visualization dependencies are optional.
Optional dependencies
GPU Memory Profiler supports several optional dependency groups that you can install based on your needs:Visualization support
For generating plots, charts, and interactive dashboards:Included packages
Included packages
- matplotlib>=3.3.0
- seaborn>=0.11.0
- plotly>=5.0.0
- dash>=2.0.0
- dash-bootstrap-components>=1.6.0
Framework extras
Install framework-specific dependencies:Terminal UI
For the interactive Textual dashboard:Included packages
Included packages
- textual>=0.57.0
- pyfiglet>=1.0.2
Development tools
For contributing to the project:Included packages
Included packages
- pytest>=8.0.0
- pytest-cov>=2.10.0
- black>=21.0.0
- flake8>=3.8.0
- mypy>=0.910
- isort>=5.9.0
- pre-commit>=2.15.0
- And more development dependencies
Testing dependencies
For running the test suite:Combined installation
You can combine multiple extras in a single command:Install from source
For the latest development version or to contribute to the project:Install in development mode
The
-e flag installs the package in editable mode, so changes to the source code are immediately reflected.Development setup
For active development with all tools:System requirements
Required
- Python: 3.10 or later
- Operating System: Linux, macOS, or Windows
- Core dependencies:
- numpy>=1.19.0
- pandas>=1.2.0
- psutil>=5.8.0
- scipy>=1.7.0
Optional
- CUDA-capable GPU: For GPU memory profiling (automatic fallback to CPU mode)
- PyTorch: 1.8+ for PyTorch profiling
- TensorFlow: 2.4+ for TensorFlow profiling
- CUDA Toolkit: Recommended for GPU support
Verify GPU support
Check if CUDA is available:CPU compatibility mode
Don’t have a GPU? No problem! GPU Memory Profiler automatically falls back to CPU memory profiling using psutil when CUDA is not available.
- RSS (Resident Set Size) memory tracking
- Same API as GPU profiling
- CSV/JSON export functionality
- Full CLI and TUI support
Command-line tools
After installation, three command-line tools are available:gpumemprof
PyTorch profiling CLI
tfmemprof
TensorFlow profiling CLI
gpu-profiler
Interactive TUI dashboard
Troubleshooting
ModuleNotFoundError: No module named 'torch'
ModuleNotFoundError: No module named 'torch'
PyTorch is required for GPU profiling features. Install it with:Or follow the official PyTorch installation guide: https://pytorch.org/get-started/locally/
ModuleNotFoundError: No module named 'tensorflow'
ModuleNotFoundError: No module named 'tensorflow'
TensorFlow is required for TF profiling features. Install it with:Or follow the official TensorFlow installation guide.
ImportError: visualization dependencies missing
ImportError: visualization dependencies missing
Visualization features require optional dependencies. Install with:
CUDA not available
CUDA not available
If you have a CUDA-capable GPU but
torch.cuda.is_available() returns False:- Verify CUDA drivers are installed:
nvidia-smi - Install PyTorch with CUDA support:
- Check CUDA compatibility with your GPU
Next steps
Quick start guide
Get your first memory profile running in 5 minutes
CLI reference
Learn about all available command-line options