Metadata-Version: 2.4
Name: nvbenjo
Version: 0.0.1
Summary: Nvbenjo is a utility for benchmarking inference of deep learning models on NVIDIA GPUs.
Author: lukas_jkl
Requires-Python: <3.15,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torchvision
Requires-Dist: torchaudio
Requires-Dist: nvitop
Requires-Dist: psutil
Requires-Dist: py-cpuinfo
Requires-Dist: hydra-core
Requires-Dist: hydra_colorlog
Requires-Dist: nvidia-ml-py
Requires-Dist: pandas
Requires-Dist: seaborn
Requires-Dist: rich
Provides-Extra: onnx-cpu
Requires-Dist: onnx>=1.14.0; extra == "onnx-cpu"
Requires-Dist: onnxruntime>=1.15.0; extra == "onnx-cpu"
Provides-Extra: onnx-gpu
Requires-Dist: onnx>=1.14.0; extra == "onnx-gpu"
Requires-Dist: onnxruntime-gpu>=1.15.0; extra == "onnx-gpu"
Dynamic: license-file

# Nvbenjo

[![Nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg)](https://github.com/wntrblm/nox)
![Ruff](https://github.com/lukas-jkl/nvbenjo/actions/workflows/ruff.yml/badge.svg)
![Tests](https://github.com/lukas-jkl/nvbenjo/actions/workflows/test.yml/badge.svg)

Nvbenjo is a utility for benchmarking inference of deep learning models on NVIDIA GPUs.
It supports models in [Onnx](https://onnx.ai/) format as well as [PyTorch](https://pytorch.org/) models.

## Usage

```bash
# 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
```

## Development

Example using uv:

```bash
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
```
