Currently under active development; see the documentation for more details.
To build from source, just do:
$ git clone https://github.com/NVIDIA/cuda-python
$ cd cuda-python/cuda_core # move to the directory where this README locates
$ pip install .For now cuda-python is a required dependency.
We use pre-commit to manage various tools to help development and ensure consistency.
pip install pre-commitRun this command before checking in the code changes
pre-commit run -a --show-diff-on-failureto ensure the code formatting is in line of the requirements (as listed in pyproject.toml).
This repository implements a security check to prevent the CI system from running untrusted code. A part of the security check consists of checking if the git commits are signed. See here and here for more details, including how to sign your commits.
To run these tests:
python -m pytest tests/against editable installationspytest tests/against installed packages
Cython tests are located in tests/cython and need to be built. These builds have the same CUDA Toolkit header requirements as those of cuda.bindings where the major.minor version must match cuda.bindings. To build them:
- Setup environment variable
CUDA_HOMEwith the path to the CUDA Toolkit installation. - Run
build_testsscript located intest/cythonappropriate to your platform. This will both cythonize the tests and build them.
To run these tests:
python -m pytest tests/cython/against editable installationspytest tests/cython/against installed packages