Kmeans
Python module: cuvs.cluster.mg.kmeans
fit
@auto_sync_multi_gpu_resources
Find clusters with single-node multi-GPU k-means using host data.
Multiple host batches use one input buffer per GPU by default. Configure
resources.set_stream_pool(1) to enable double-buffering and
transfer/compute overlap; without it, execution is correct but serialized.
Pinned host memory is crucial for performance: pageable or unregistered
memory-mapped input degrades throughput rapidly.
A per-device memory pool is optional but recommended. Configure both pools
before calling fit.
Parameters
Returns
FitOutput
centroids is a host NumPy array containing the computed centroids,
inertia is the final objective value, and n_iter is the number
of iterations run.
Examples