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

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

cuda_bench-0.3.0-cp314-cp314-manylinux_2_27_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64

cuda_bench-0.3.0-cp313-cp313-manylinux_2_27_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

cuda_bench-0.3.0-cp312-cp312-manylinux_2_27_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

cuda_bench-0.3.0-cp311-cp311-manylinux_2_27_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

cuda_bench-0.3.0-cp310-cp310-manylinux_2_27_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

File details

Details for the file cuda_bench-0.3.0-cp314-cp314-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for cuda_bench-0.3.0-cp314-cp314-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 c493bae3fb993d166fe99397dca4939f22122c171dce14f715ba1828b1e725d2
MD5 0255a0ff0ba38eb6f25a265aa2393577
BLAKE2b-256 f7cc194f0736f728b6e8e302ee85bba343618c4f982201ce3c490fa76a1fd607

See more details on using hashes here.

Provenance

The following attestation bundles were made for cuda_bench-0.3.0-cp314-cp314-manylinux_2_27_x86_64.whl:

Publisher: publish-wheels.yml on NVIDIA/nvbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cuda_bench-0.3.0-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for cuda_bench-0.3.0-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 e4633d29aeb7bcc50aa74cebc4dbda2735256565177a46d338ea4a0b1a1e9114
MD5 d02cf5876b8f303b34142b777a11fc21
BLAKE2b-256 8a0fa0466f3b8c8b899106009e3dbba473e45c704b10d9d4a69e6a3e9dbd1376

See more details on using hashes here.

Provenance

The following attestation bundles were made for cuda_bench-0.3.0-cp313-cp313-manylinux_2_27_x86_64.whl:

Publisher: publish-wheels.yml on NVIDIA/nvbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cuda_bench-0.3.0-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for cuda_bench-0.3.0-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 023832e4ea1b2d00bcab79e0ab42310d382d3e2a006725a9e551ca4d6def56e2
MD5 fc61cab12f74774688f180b5e90f5060
BLAKE2b-256 537e6bb520e920588cda928e599fff37636afa50922ca66b0fabb7cc28512a7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cuda_bench-0.3.0-cp312-cp312-manylinux_2_27_x86_64.whl:

Publisher: publish-wheels.yml on NVIDIA/nvbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cuda_bench-0.3.0-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for cuda_bench-0.3.0-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 02e743174c976b6eb35cf017dd72cd1c199e6215dbb4ca53b38784f926e77dc6
MD5 6e7ba9d06eb8f5286075e6e29a4b11b6
BLAKE2b-256 e7f9986518428c55ade11044dd5b2ddcccaef0f5820f445c65b479af11bf3296

See more details on using hashes here.

Provenance

The following attestation bundles were made for cuda_bench-0.3.0-cp311-cp311-manylinux_2_27_x86_64.whl:

Publisher: publish-wheels.yml on NVIDIA/nvbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cuda_bench-0.3.0-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for cuda_bench-0.3.0-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 a7648f27e709c199552dbfb4893d608e2b6da35372e9da97dc5c86ec5c8a97c5
MD5 202d94ca45616bbef53abeb2003017db
BLAKE2b-256 5538254ea199d60f544f1dd9b5b7acb80376d294ccecdf2f963ca850ecfaa99a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cuda_bench-0.3.0-cp310-cp310-manylinux_2_27_x86_64.whl:

Publisher: publish-wheels.yml on NVIDIA/nvbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

5 files

0.2.1

4 files

0.2.0

4 files

0.1.0

4 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page