Registry / ai-ml / nvidia-curand-cu12

nvidia-curand-cu12

JSON →
library10.3.10.19pypypi✓ verified 24d ago

The `nvidia-curand-cu12` package provides the native runtime libraries for NVIDIA's CUDA Random Number Generation (CURAND) library, specifically compiled for CUDA Toolkit 12.x. It acts as a foundational dependency for higher-level Python libraries that wrap CUDA functionalities, enabling GPU-accelerated random number generation. The current version is 10.3.10.19, and it typically follows the CUDA Toolkit's release cadence.

pip install nvidia-curand-cu12
INSTALL
IMPORT
SIG · NVIDIA-CURAND-CU12
N
nvidia-curand-cu12
ai-mlpythonv10.3.10.19
Install
2.9s avg
Import
Disk
177MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v10.3.10.19 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.9s · import 0.000s · 180MB
177MB installed
● package 177MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

No direct Python imports
This package primarily provides native runtime libraries and is typically consumed by other Python wrappers (e.g., CuPy, Numba) rather than being directly imported in Python code.
`nvidia-curand-cu12` is a low-level runtime dependency; its functionalities are exposed through higher-level libraries that interface with the CUDA Toolkit.

This quickstart demonstrates how a higher-level library like CuPy would utilize the underlying CURAND runtime provided by `nvidia-curand-cu12`. The `nvidia-curand-cu12` package itself does not expose direct Python APIs for import, but rather provides the necessary native libraries for GPU-accelerated random number generation that CuPy (or similar libraries) wrap. Ensure CuPy is installed (`pip install cupy-cuda12x`) and a CUDA-capable GPU is present.

# The nvidia-curand-cu12 package itself is not directly imported. # Instead, its functionalities are used by other libraries. # Here's an example using CuPy, which would leverage CURAND under the hood. import cupy as cp # Ensure a CUDA-capable GPU is available if cp.cuda.is_available(): print(f"CUDA is available. Current device: {cp.cuda.Device().name}") # Generate random numbers using CuPy, which utilizes CURAND # on the GPU if nvidia-curand-cu12 is correctly installed and configured. gpu_random_array = cp.random.rand(5) print("GPU-generated random array:", gpu_random_array) # Example of generating normally distributed random numbers gpu_normal_array = cp.random.normal(loc=0.0, scale=1.0, size=5) print("GPU-generated normal array:", gpu_normal_array) else: print("CUDA is not available. Please ensure a compatible GPU and CUDA Toolkit are installed.")
Debug
Known issues
gotchaThis package is a native runtime library for CUDA and does not provide a direct Python API for `curand` functions. You typically use it as a dependency for other Python libraries like CuPy or Numba that wrap CUDA functionalities.
fix
Install a higher-level wrapper library (e.g., `cupy-cuda12x`) to interact with CURAND from Python.
affects: All
breakingRequires a compatible NVIDIA CUDA-capable GPU and an NVIDIA GPU driver. Without these, the package will install but its core functionality will not be usable, potentially leading to runtime errors in dependent libraries.
fix
Ensure your system has a supported NVIDIA GPU and the appropriate NVIDIA GPU drivers are installed and up-to-date. Verify CUDA Toolkit is correctly configured.
affects: All
gotchaDependency resolution with `pip` can be complex due to the intricate CUDA ecosystem. Installing multiple `nvidia-*cu12` packages or conflicting versions of CUDA-dependent libraries can lead to `pip` backtracking issues, resulting in slow or failed installations.
fix
Use stricter version constraints for `nvidia-*cu12` packages and their dependants, or consider using environment managers like Conda which can sometimes handle these dependencies more robustly.
affects: All
gotchaThe `cu12` suffix indicates compatibility with CUDA Toolkit 12.x. Using this package with applications built for different major CUDA versions (e.g., CUDA 11.x) will likely lead to compatibility issues or runtime failures.
fix
Ensure all CUDA-dependent libraries and the installed CUDA Toolkit version match the `cu12` designation of this package.
affects: All
breakingThis package is hosted on the NVIDIA Python Package Index. Attempting to install it directly from PyPI.org without configuring the NVIDIA index will result in a `RuntimeError` stating it's a placeholder and suggesting installation via `nvidia-pyindex`.
fix
First, install the NVIDIA PyPI index configurator: `pip install nvidia-pyindex`. Then, install this package: `pip install nvidia-curand-cu12`.
affects: All
Upgrade
Version history
10.3.10.19latest on PyPI · released May 1, 2025
Audit
Dependencies
NVIDIA CUDA Toolkit (12.x compatible)requiredThis package provides native runtime libraries for CUDA 12.x. A compatible CUDA Toolkit installation and NVIDIA GPU driver are required for functionality.
NVIDIA GPUrequiredRequires a CUDA-capable NVIDIA GPU to utilize the accelerated random number generation capabilities.
Agent activity
5 hits · last 30 days
node
4
Resources
nvidia-curand-cu12 — pip install nvidia-curand-cu12 · libregistry