Skip to content

monishapuli13/ML-Performance-Profiler

Repository files navigation

ML Performance Profiler

A lightweight PyTorch benchmarking and profiling toolkit for analyzing neural network performance.

Features

  • PyTorch Profiler integration
  • CPU execution profiling
  • Chrome trace export
  • Memory utilization monitoring
  • Throughput benchmarking
  • CSV report generation
  • Performance visualization

Project Structure

ML-Performance-Profiler/
├── benchmark.py
├── metrics.py
├── throughput.py
├── report.py
├── visualize.py
├── reports/
│   ├── results.csv
│   └── throughput.png
├── traces/
│   └── trace.json
└── requirements.txt

Installation

pip install -r requirements.txt

Run Benchmark

python benchmark.py

Example Output

Elapsed Time: 8.32s
Throughput: 3077.28 samples/sec
Memory Usage: 368.97 MB
Trace saved to traces/trace.json

Generate Visualization

python visualize.py

Output:

reports/
├── results.csv
└── throughput.png

Metrics Collected

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

Technologies

  • Python
  • PyTorch
  • Pandas
  • Matplotlib
  • psutil

Future Improvements

  • GPU profiling support
  • Multi-model benchmarking
  • Interactive dashboard
  • Distributed training analysis
  • Automated optimization suggestions

Benchmark Results

Execution Trace Analysis

PyTorch execution trace visualized using Perfetto.

About

PyTorch performance profiling toolkit for execution timing, memory monitoring, throughput benchmarking, and interactive visualization with CI/CD-ready reports.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages