Remove host-fp32 → device-fp16 downcast path in NN-Descent once cuML accepts fp16 natively
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
Background
NN-Descent currently supports internal_distance_dtype = CUDA_R_16F for fp32 inputs.
When the input lives on host memory, we downcast it to fp16 while copying it to device, so the on-device copy is in fp16 instead of its native fp32 dtype.
Doing this in NN-Descent is a special case relative to the rest of cuVS.
Proposal
Once cuML UMAP and HDBSCAN can natively accept fp16 input (tracked in https://github.com/rapidsai/cuml/issues/8102), remove the host-fp32 → device-fp16 downcast path from NN-Descent:
- Drop the
d_data_half_buffer andconvert_copy_kernelfromcpp/src/neighbors/detail/nn_descent.cuh. - Remove the
internal_distance_dtypeparameter from the C++, C, and Python index params.
Related
- Originally introduced in PR https://github.com/rapidsai/cuvs/pull/1928
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
First verify that cuML UMAP and HDBSCAN accept fp16 natively by checking cuML issue 8102. Then inspect cpp/src/neighbors/detail/nn_descent.cuh and the C++, C, and Python index parameter definitions. Done means the d_data_half_ buffer, convert_copy_kernel, and internal_distance_dtype parameter are removed without retaining the host-fp32 to device-fp16 path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, python
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100