Nvbenjo is a utility for benchmarking inference of deep learning models on NVIDIA GPUs.
Project description
Nvbenjo
Nvbenjo is a utility for benchmarking inference of deep learning models on NVIDIA GPUs. It supports models in Onnx format as well as PyTorch models. Nvbenjo generates comprehensive benchmark results including:
- CSV file with all measurement data (latency, throughput, memory usage, etc.)
- Plots visualizing the benchmark results
Demo
Installing
pip install nvbenjo
If you need a specific version of PyTorch or want to benchmark Onnx models adapt your install:
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu130
pip install onnx onnxruntime-gpu
pip install nvbenjo
Usage
# Specify models to run in the command line
nvbenjo \
"+nvbenjo.models={\
efficientnet: {type_or_path: 'torchvision:efficientnet_b0', shape:['B',3,224,224], batch_sizes: [16,32]},\
resnet: {type_or_path: 'torchvision:wide_resnet101_2', shape: ['B',3,224,224], batch_sizes: [16,32]}\
}"
# or better, specify your own config (or one of the pre-defined config files)
nvbenjo -cn small
nvbenjo -cn="/my/config/path/myconfig.yaml"
# override single arguments of your config
nvbenjo -cn="/my/config/path/myconfig.yaml" nvbenjo.models.mymodel.num_batches=10
# show current config and help
nvbenjo -cn="/my/config/path/myconfig.yaml" --help
Take a look at the Documentation for more information as well as example configurations.
Development
Example using uv:
uv sync --extra dev --extra onnx-cpu # or gpu
uv run nvbenjo
# for a quick run
uv run nvbenjo -cn small
# tests
uv run pytest
uv run nox
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nvbenjo-0.0.2.tar.gz.
File metadata
- Download URL: nvbenjo-0.0.2.tar.gz
- Upload date:
- Size: 507.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bd4782644606069a5e3eb6312000c8291ce57434d836a4779257e857114d31b
|
|
| MD5 |
a2a5d324eca6e724dfd2c9fbc5c1f970
|
|
| BLAKE2b-256 |
b35907fa81a0a95cd8ec37fcb13be22cfa788d5cd7e0e5e4b6dd84326ff2a9fb
|
File details
Details for the file nvbenjo-0.0.2-py3-none-any.whl.
File metadata
- Download URL: nvbenjo-0.0.2-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f8810c4f68ad98726e64bd7f20ce34b850811fcbb886ef7369b55ef16af59be
|
|
| MD5 |
b37127b4a2c9ec29f19bf4689d794c96
|
|
| BLAKE2b-256 |
2e01cf369b0d2cb8aecff3d265861ef46907bd6f96ea05660bd872d6ca2db332
|