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-cuda12xVerified import paths — ran on the pinned version, not inferred.
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`.
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).
Update import statements from `from cuml.internals import check_is_fitted` to `from cuml.internals.validation import check_is_fitted`.
If you plan to use distributed cuML algorithms, explicitly install `dask` and `distributed` via `pip install dask distributed` or `conda install dask-ml`.
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.
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.
Update calls from `estimator.convert_to_cupy()` to `estimator.as_cupy()`, and similarly for `cudf`.