A lightweight PyTorch benchmarking and profiling toolkit for analyzing neural network performance.
- PyTorch Profiler integration
- CPU execution profiling
- Chrome trace export
- Memory utilization monitoring
- Throughput benchmarking
- CSV report generation
- Performance visualization
ML-Performance-Profiler/
├── benchmark.py
├── metrics.py
├── throughput.py
├── report.py
├── visualize.py
├── reports/
│ ├── results.csv
│ └── throughput.png
├── traces/
│ └── trace.json
└── requirements.txt
pip install -r requirements.txtpython benchmark.pyExample Output
Elapsed Time: 8.32s
Throughput: 3077.28 samples/sec
Memory Usage: 368.97 MB
Trace saved to traces/trace.json
python visualize.pyOutput:
reports/
├── results.csv
└── throughput.png
| Metric | Description |
|---|---|
| CPU Time | Operator-level execution time |
| Memory Usage | Process memory consumption |
| Throughput | Samples processed per second |
| Execution Trace | Chrome trace for performance analysis |
- Python
- PyTorch
- Pandas
- Matplotlib
- psutil
- GPU profiling support
- Multi-model benchmarking
- Interactive dashboard
- Distributed training analysis
- Automated optimization suggestions
PyTorch execution trace visualized using Perfetto.

