Home

Awesome

CUDA-Python

CUDA Python is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python. Checkout the Overview for the workflow and performance results.

Installing

CUDA Python can be installed from:

There're differences in each of these options that are described further in Installation documentation. Each package will guarantee minor version compatibility.

Runtime Dependencies

CUDA Python is supported on all platforms that CUDA is supported. Specific dependencies are as follows:

Only the NVRTC redistributable component is required from the CUDA Toolkit. CUDA Toolkit Documentation Installation Guides can be used for guidance. Note that the NVRTC component in the Toolkit can be obtained via PYPI, Conda or Local Installer.

Supported Python Versions

CUDA Python follows NEP 29 for supported Python version guarantee.

Before dropping support, an issue will be raised to look for feedback.

Source builds work for multiple Python versions, however pre-build PyPI and Conda packages are only provided for a subset:

Testing

Requirements

Latest dependencies can be found in requirements.txt.

Unit-tests

You can run the included tests with:

python -m pytest tests/

Benchmark

You can run benchmark only tests with:

python -m pytest --benchmark-only benchmarks/

Samples

You can run the included tests with:

python -m pytest examples/

Examples

CUDA Samples rewriten using CUDA Python are found in examples.

Custom extra included examples: