Registry / ai-ml / cuml-cu12

cuml-cu12

JSON →
library26.6.0pypypiunverified

cuML is a suite of GPU-accelerated machine learning algorithms provided by the RAPIDS ecosystem, designed to be API-compatible with scikit-learn for ease of use. It leverages NVIDIA CUDA for high-performance computing on GPUs, significantly speeding up tasks like clustering, regression, classification, and dimensionality reduction. It generally follows a monthly release cadence, aligning with the broader RAPIDS release schedule. The `cuml-cu12` package specifically targets CUDA 12.

pip install cuml-cu12 cupy-cuda12x
INSTALL
IMPORT
SIG · CUML-CU12
C
cuml-cu12
ai-mlpythonv26.6.0
Install
95.9s avg
Import
10545ms
Disk
6246MB
Pass rate
2/ 10
Env Coverage2 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.2.0 · 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
glibc
py 3.10
✕ build_error
1/3 runs
py 3.11
✕ build_error
✕ timeout
py 3.12
✕ build_error
✓ 94.47s
py 3.13
✕ build_error
✓ 97.4s
py 3.9
✕ build_error
✕ build_error
6246MB installed
● package 6246MB
Code
Verified usage

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

KMeans
from cuml.cluster import KMeans
LogisticRegression
from cuml.linear_model import LogisticRegression
RandomForestClassifier
from cuml.ensemble import RandomForestClassifier
check_is_fitted
from cuml.internals.validation import check_is_fitted
from cuml.internals import check_is_fitted
Path changed in v26.04.00

This quickstart demonstrates basic GPU-accelerated K-Means clustering using cuML. It generates sample data on the CPU, transfers it to the GPU using CuPy, performs the clustering, and then retrieves the results back to the CPU. Ensure `cupy-cuda12x` is installed alongside `cuml-cu12`.

import cuml import cupy as cp import numpy as np # For reproducibility np.random.seed(0) # Generate some random data on the CPU n_samples = 1000 n_features = 2 n_clusters = 3 X_host = np.random.rand(n_samples, n_features) * 10 # Simulate clusters for i in range(n_clusters): X_host[i*n_samples//n_clusters:(i+1)*n_samples//n_clusters] += i * 2 # Transfer data to GPU using CuPy X_gpu = cp.asarray(X_host, dtype=cp.float32) # Initialize and train KMeans on the GPU kmeans_cuml = cuml.cluster.KMeans(n_clusters=n_clusters, random_state=0) kmeans_cuml.fit(X_gpu) # Get cluster centers and labels (still on GPU) cluster_centers_gpu = kmeans_cuml.cluster_centers_ labels_gpu = kmeans_cuml.labels_ print("CuML KMeans fitted successfully.") print(f"Cluster Centers (on GPU):\n{cluster_centers_gpu}") print(f"First 10 Labels (on GPU): {labels_gpu[:10]}") # Transfer results back to CPU if needed cluster_centers_cpu = cluster_centers_gpu.get() labels_cpu = labels_gpu.get() print(f"Cluster Centers (on CPU):\n{cluster_centers_cpu}") print(f"First 10 Labels (on CPU): {labels_cpu[:10]}")
Debug
Known issues
breakingSparse input validation now raises `TypeError` for unsupported types. Algorithms that previously implicitly handled or failed with unsupported sparse formats will now explicitly raise an error.
fix
Ensure sparse inputs are converted to `cudf.SparseSeries`, `cudf.SparseDataFrame`, or a dense `cudf.DataFrame`/`cupy.ndarray` as required by the specific algorithm, or to a sparse format explicitly supported by the algorithm (e.g., `scipy.sparse.csr_matrix` for some estimators).
affects: >=26.04.00
breakingThe `check_is_fitted` utility function has been moved from `cuml.internals` to `cuml.internals.validation` for better organization and adherence to internal validation structures.
fix
Update import statements from `from cuml.internals import check_is_fitted` to `from cuml.internals.validation import check_is_fitted`.
affects: >=26.04.00
gotcha`dask` became an optional dependency. Attempting to use `cuml.dask` modules or distributed functionalities without `dask` installed will result in a `ModuleNotFoundError`.
fix
If you plan to use distributed cuML algorithms, explicitly install `dask` and `distributed` via `pip install dask distributed` or `conda install dask-ml`.
affects: >=25.12.00
deprecatedThe `TotalIters` parameter for SVC/SVR estimators has been deprecated. It may be removed in future versions.
fix
Review your code for usage of `TotalIters` in SVC/SVR. If it's used, consider alternative ways to manage iteration limits or consult the latest documentation for equivalent parameters, if any.
affects: >=26.02.00
deprecatedThe `handle` attribute has been deprecated and removed from public cuML APIs. Direct access to `estimator.handle` is no longer supported.
fix
Avoid accessing the `handle` attribute directly. This attribute exposed internal CUDA context management and should not be used by end-users. If explicit CUDA stream or resource management is required, refer to advanced RAPIDS documentation for proper techniques.
affects: >=26.02.00
breakingDeprecated `convert_to_*` methods (e.g., `convert_to_cupy`, `convert_to_cudf`) in `cuml.ensemble` estimators have been removed in favor of `as_*` methods (e.g., `as_cupy`, `as_cudf`).
fix
Update calls from `estimator.convert_to_cupy()` to `estimator.as_cupy()`, and similarly for `cudf`.
affects: >=25.10.00
Upgrade
Version history
26.6.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
pythonrequiredRequired for execution
cupy-cuda12xrequiredEssential for GPU array operations and data handling.
cudf-cu12requiredGPU DataFrames, often used for input/output with cuML algorithms.
scikit-learnrequiredFor API compatibility and some utility functions.
daskoptionalFor distributed computing capabilities (e.g., cuml.dask module).
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources