The `nvidia-curand` library provides the native CURAND shared libraries, making them discoverable via `pip` for Python packages that utilize GPU-accelerated random number generation. It is not intended for direct Python API calls but serves as a crucial dependency for libraries like CuPy and Numba. The current version is 10.4.2.51, and its releases are typically tied to updates of the NVIDIA CUDA Toolkit.
pip install nvidia-curandVerified import paths — ran on the pinned version, not inferred.
Demonstrates how CuPy, which relies on native libraries like those provided by `nvidia-curand`, can generate GPU-accelerated random numbers. This package ensures the underlying cuRAND shared objects are available for CuPy and similar libraries. A functional NVIDIA GPU and compatible drivers are required for this code to run successfully.
Use a Python wrapper library like CuPy (`import cupy as cp`) or Numba for GPU-accelerated random number generation. Ensure these wrappers are compatible with the `nvidia-curand` version you have installed.
Install the appropriate NVIDIA GPU drivers for your hardware. Ensure your system meets the minimum requirements for the CUDA Toolkit version associated with `nvidia-curand`.
Always ensure that the `nvidia-curand` package, your system's CUDA Toolkit, GPU drivers, and any dependent Python libraries (like CuPy) are compatible. Refer to NVIDIA's documentation for specific version compatibility matrices.
For most standard installations, `pip` manages paths automatically. If you encounter library not found errors, check your `LD_LIBRARY_PATH` (Linux) or `PATH` (Windows) and ensure it includes the directory where the `nvidia-curand` shared libraries are installed (usually within your Python environment's `site-packages/nvidia/curand/lib`).