Skip to main content

Deep Learning Benchmark Tool

A deep learning model performance benchmarking tool that supports image classification, object detection, semantic segmentation tasks with pretrained/customized models on multiple datasets. This tool aims to give a glance at the ML performance of your device.

System Requirements

  • Python 3.7+
  • PyTorch 1.8+
  • CUDA-supported GPU (optional, for GPU acceleration)
  • Recommended memory: 8GB+ (depends on model size)

Install Basic Dependencies

pip install -r requirements.txt

Basic Usage

View Available Options (if you run from source code)

# List all available models
python -m hardware_ml_benchmark.main --list-models

# List all available datasets
python -m hardware_ml_benchmark.main --list-datasets

# View complete help information
python -m hardware_ml_benchmark.main --help

Possible Questions

CUDA Related Errors

# Check if CUDA is available
python -c "import torch; print(torch.cuda.is_available())"

Permission Issues (Windows)

# Run command prompt as administrator
# Or modify output directory to a directory with write permissions
python -m hardware_ml_benchmark.main --output-dir C:\Users\YourName\benchmark_results ...

Command Line Examples

Quick Test (CPU, 100 samples, classification):

python -m hardware_ml_benchmark.main \
    --task classification \
    --model resnet18 \
    --dataset MNIST \
    --device cpu \
    --samples 100

GPU Accelerated Test(detection):

python -m hardware_ml_benchmark.main \
    --task detection \
    --model fasterrcnn-resnet50-fpn \
    --dataset COCO-Sample \
    --device cuda:0 \
    --samples 500

Large Scale Test (automatic device selection,segmentation):

python -m hardware_ml_benchmark.main \
    --task segmentation \
    --model unet_resnet34 \
    --dataset Synthetic-Segmentation \
    --device auto \
    --samples 1000

Advanced Options Examples

Custom Output Directory:

    python -m hardware_ml_benchmark.main --output-dir ./my_results

Chart Generation:

    python -m hardware_ml_benchmark.main --plot

Silent Mode (reduced output):

    python -m hardware_ml_benchmark.main --quiet

Test All Samples:

    python -m hardware_ml_benchmark.main --samples -1

Model and Dataset Support

Task Supported Models Datasets CPU Support
Classification ResNet, EfficientNet, ViT, MobileNet MNIST, CIFAR-10, ImageNet-Sample
Detection YOLOv8, Faster R-CNN, FCOS COCO-Sample, KITTI, Test-Images
Segmentation U-Net, DeepLabV3+, PSPNet, FPN Cityscapes, Synthetic-Segmentation

specifying models by name, local path, or URL

Model by name (existing functionality)

python -m hardware_ml_benchmark.main --task detection --model yolov8n --dataset Test-Images

Local path with tilde expansion

python -m hardware_ml_benchmark.main --task detection --model ~/models/my_yolo.pt --dataset Test-Images

Relative path

python -m hardware_ml_benchmark.main --task detection --model ./checkpoints/best.pth --dataset Test-Images

Absolute path

python -m hardware_ml_benchmark.main --task classification --model /home/user/models/resnet.pth --dataset MNIST

URL

python -m hardware_ml_benchmark.main --task detection --model https://example.com/models/yolo.pt --dataset Test-Images

Limitations

-The current implementation only supports specific model formats (PyTorch .pt/.pth files, YOLO models, and framework-specific architectures).

  • The current statistical reporting is limited to mean, standard deviation, min, and max values. The tool lacks advanced performance analysis including percentile distributions, confidence intervals, statistical significance testing, and performance regression detection across multiple runs.

  • The implementation assumes single-device execution and lacks support for distributed inference, multi-GPU benchmarking, or batch parallelization strategies that would be essential for evaluating large-scale deployment scenarios.

Future work

  • Model Optimization Integration: Implement support for quantized models (INT8, FP16), pruned networks, and knowledge-distilled architectures to enable realistic performance comparisons between optimized and baseline models.

  • Energy Efficiency Metrics: Extend monitoring to include power consumption measurements and energy-per-inference metrics, which are increasingly critical for edge deployment and sustainability considerations.

  • Asynchronous Inference Profiling: Develop tools to measure pipeline parallelism, async data loading efficiency, and queue management overhead that are critical for production inference servers.

Contribution

Past contributors: Zihan Deng

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hardware_ml_benchmark-0.2.1.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hardware_ml_benchmark-0.2.1-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file hardware_ml_benchmark-0.2.1.tar.gz.

File metadata

  • Download URL: hardware_ml_benchmark-0.2.1.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for hardware_ml_benchmark-0.2.1.tar.gz
Algorithm Hash digest
SHA256 64ee1e2317a3a6a6720e787e7236d8989d856760a991849c81361b3114caaa63
MD5 d4cfe2ebaaea69536ecbe238145d3b3f
BLAKE2b-256 bd75a55805da8fb1037a75bce6bbbe2e8ce79fda106db72d2ce8ddc663334d0a

See more details on using hashes here.

File details

Details for the file hardware_ml_benchmark-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hardware_ml_benchmark-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e586f9264c6d402270816f4b5f6551c63b2b975e575254d999ea9d97dbb89df
MD5 15c095c5e9c195145e67e361a09aa6d7
BLAKE2b-256 efa50b5159441e75145aed1870f5c3d4c796972386266b9d9bd9b17223945fd0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page