-
Notifications
You must be signed in to change notification settings - Fork 603
Open
Labels
algo: hdbscanimprovementImprovement / enhancement to an existing functionImprovement / enhancement to an existing function
Description
Current implementation of HDBSCAN puts data on GPU memory at the python layer.
cuml/python/cuml/cuml/cluster/hdbscan/hdbscan.pyx
Lines 916 to 928 in e05c9a5
| def fit(self, X, y=None, *, convert_dtype=True) -> "HDBSCAN": | |
| """ | |
| Fit HDBSCAN model from features. | |
| """ | |
| kwds = self.build_kwds or {} | |
| if kwds.get("knn_n_clusters", 1) > 1: | |
| logger.warn("Using data on host memory because knn_n_clusters > 1.") | |
| convert_to_mem_type = MemoryType.host | |
| else: | |
| logger.warn("Using data on device memory because knn_n_clusters = 1.") | |
| convert_to_mem_type = MemoryType.device | |
NN-Descent always copies the input data to GPU memory, even if the user originally provides it on the GPU. This is required because the algorithm internally converts the data to FP16. As a result, providing GPU-resident data leads to duplicate GPU allocations and unnecessary memory usage.
Therefore, when using the `nn_descent option, the input data should be put on CPU memory to avoid this extra GPU-side copy.
Metadata
Metadata
Assignees
Labels
algo: hdbscanimprovementImprovement / enhancement to an existing functionImprovement / enhancement to an existing function