Installation#

Installing Conda Packages#

cuPyNumeric supports the same platforms as Legate.

cuPyNumeric is available from conda on the legate channel.

Note

conda version >= 24.1 required

# with a new environment
$ conda create -n myenv -c conda-forge -c legate cupynumeric

# =========== OR =========== #

# into an existing environment
$ conda install -c conda-forge -c legate cupynumeric

Important

Packages are only offered for Linux (x86_64 and aarch64) supporting Python versions 3.10 to 3.12.

Installing PyPI Packages#

cuPyNumeric is also available from PyPI. To install, run the following command:

# into existing environment
$ pip install nvidia-cupynumeric

# =========== OR =========== #

# into new environment
$ python -m venv myenv
$ source myenv/bin/activate
$ pip install nvidia-cupynumeric

This will install the latest version of cuPyNumeric and the corresponding version of Legate.

The cuPyNumeric package on PyPI is multi-node and multi-rank capable. Please check Legate documentation to find more details about running on multiple nodes.

Important

Packages are only offered for Linux (x86_64 and aarch64) supporting Python versions 3.10 to 3.12.

Verify your Installation#

You can verify the installation by running one of the examples.

For instance:

$ legate examples/black_scholes.py
Running black scholes on 10K options...
Elapsed Time: 129.017 ms

Conda and GPU / CPU Variants#

conda automatically installs the right variant for the system: * CPU variant if no NVIDIA GPU is detected * GPU variant if an NVIDIA GPU is detected

To override this behavior and force install a version with GPU support, use the following (with the desired CUDA version):

$ CONDA_OVERRIDE_CUDA="12.2" conda install -c conda-forge -c legate cupynumeric

Building from source#

See Building from source for instructions on building cuPyNumeric manually.

Licenses#

This project will download and install additional third-party open source software projects at install time. Review the license terms of these open source projects before use.

For license information regarding projects bundled directly, see Third-party notices.