Skip to main content

CUDA Kernel Benchmarking Package

This package provides a Python API to the CUDA Kernel Benchmarking Library NVBench.

Installation

Install from PyPI:

python -m pip install cuda-bench

Use an optional dependency if you want pip to install a compatible cuda-bindings package as well:

python -m pip install "cuda-bench[cu12]"  # Install cuda-bindings 12.x
python -m pip install "cuda-bench[cu13]"  # Install cuda-bindings 13.x

The published Linux wheel is compatible with both CUDA 12.x and CUDA 13.x Python environments. It contains two native extensions: one built with a CUDA 12.x Toolkit and installed under cuda.bench.cu12, and one built with a CUDA 13.x Toolkit and installed under cuda.bench.cu13. At runtime, cuda-bench queries the installed cuda.bindings package to determine the CUDA major version and loads the matching native extension.

The cu12 and cu13 extras do not select different cuda-bench wheels. They only select the compatible cuda-bindings dependency family. If your environment already provides an appropriate cuda-bindings 12.x or 13.x package, installing plain cuda-bench is sufficient.

A local CUDA Toolkit is not required when installing a published wheel, but the NVIDIA driver must support the CUDA runtime used by the installed cuda.bindings package. Use the same CUDA major version for other CUDA Python binary packages in the environment, for example cupy-cuda12x with cuda-bench[cu12] or cupy-cuda13x with cuda-bench[cu13].

Building from source

Ensure recent version of CMake

Since nvbench requires CMake >=3.30.4, either install a recent CMake or create a conda environment with CMake and Ninja:

conda create -n build_env --yes cmake ninja
conda activate build_env

Ensure CUDA compiler

Building cuda-bench from source requires a CUDA Toolkit with nvcc. Ensure that the appropriate environment variables are set. For example, on Linux, assuming the CUDA Toolkit is installed system-wide:

export CUDACXX=/usr/local/cuda/bin/nvcc
export CUDAARCHS=all-major

Unlike the published wheel, a local source build only builds the native extension for the CUDA Toolkit found by CMake. The CUDA major version selected in the install command below must match that Toolkit.

Build Python project

Now switch to the Python package directory and install cuda-bench from source:

cd nvbench/python

python -m pip install ".[cu12]"  # If CUDACXX points to a CUDA 12.x toolkit
python -m pip install ".[cu13]"  # If CUDACXX points to a CUDA 13.x toolkit

Alternatively, ensure build requirements are installed and use editable install:

cd nvbench/python
python -m pip install "scikit-build-core>=0.10" setuptools_scm

python -m pip install --no-build-isolation -e ".[cu12]"  # If CUDACXX points to a CUDA 12.x toolkit
python -m pip install --no-build-isolation -e ".[cu13]"  # If CUDACXX points to a CUDA 13.x toolkit

Verify that package works

python test/smoke.py

Run examples

# Example benchmarking numba.cuda kernel
python examples/throughput.py
# Example benchmarking kernels authored using cuda.core
python examples/axes.py
# Example benchmarking algorithms from cuda.cccl.parallel
python examples/cccl_parallel_segmented_reduce.py
# Example benchmarking CuPy function
python examples/cupy_extract.py

Metadata

Release files for cuda-bench 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cuda-bench 0.3.0
File
cuda_bench-0.3.0-cp314-cp314-manylinux_2_27_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64 Details
cuda_bench-0.3.0-cp313-cp313-manylinux_2_27_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64 Details
cuda_bench-0.3.0-cp312-cp312-manylinux_2_27_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64 Details
cuda_bench-0.3.0-cp311-cp311-manylinux_2_27_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64 Details
cuda_bench-0.3.0-cp310-cp310-manylinux_2_27_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64 Details

Total release size: 12.6 MB

Release files / cuda_bench-0.3.0-cp314-cp314-manylinux_2_27_x86_64.whl

Download URL cuda_bench-0.3.0-cp314-cp314-manylinux_2_27_x86_64.whl
Size 2.5 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64
SHA-256 checksum
How to use checksums
c493bae3fb993d166fe99397dca4939f22122c171dce14f715ba1828b1e725d2
BLAKE2b-256 checksum
How to use checksums
f7cc194f0736f728b6e8e302ee85bba343618c4f982201ce3c490fa76a1fd607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / cuda_bench-0.3.0-cp313-cp313-manylinux_2_27_x86_64.whl

Download URL cuda_bench-0.3.0-cp313-cp313-manylinux_2_27_x86_64.whl
Size 2.5 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64
SHA-256 checksum
How to use checksums
e4633d29aeb7bcc50aa74cebc4dbda2735256565177a46d338ea4a0b1a1e9114
BLAKE2b-256 checksum
How to use checksums
8a0fa0466f3b8c8b899106009e3dbba473e45c704b10d9d4a69e6a3e9dbd1376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / cuda_bench-0.3.0-cp312-cp312-manylinux_2_27_x86_64.whl

Download URL cuda_bench-0.3.0-cp312-cp312-manylinux_2_27_x86_64.whl
Size 2.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64
SHA-256 checksum
How to use checksums
023832e4ea1b2d00bcab79e0ab42310d382d3e2a006725a9e551ca4d6def56e2
BLAKE2b-256 checksum
How to use checksums
537e6bb520e920588cda928e599fff37636afa50922ca66b0fabb7cc28512a7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / cuda_bench-0.3.0-cp311-cp311-manylinux_2_27_x86_64.whl

Download URL cuda_bench-0.3.0-cp311-cp311-manylinux_2_27_x86_64.whl
Size 2.5 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64
SHA-256 checksum
How to use checksums
02e743174c976b6eb35cf017dd72cd1c199e6215dbb4ca53b38784f926e77dc6
BLAKE2b-256 checksum
How to use checksums
e7f9986518428c55ade11044dd5b2ddcccaef0f5820f445c65b479af11bf3296
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / cuda_bench-0.3.0-cp310-cp310-manylinux_2_27_x86_64.whl

Download URL cuda_bench-0.3.0-cp310-cp310-manylinux_2_27_x86_64.whl
Size 2.5 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64
SHA-256 checksum
How to use checksums
a7648f27e709c199552dbfb4893d608e2b6da35372e9da97dc5c86ec5c8a97c5
BLAKE2b-256 checksum
How to use checksums
5538254ea199d60f544f1dd9b5b7acb80376d294ccecdf2f963ca850ecfaa99a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

5 release files

0.2.1

4 release files

0.2.0

4 release files

0.1.0

4 release 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