NVIDIA / NVIDIA/cuvs

Remove host-fp32 → device-fp16 downcast path in NN-Descent once cuML accepts fp16 natively

Open
#2,079 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

improvement
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 and convert_copy_kernel from cpp/src/neighbors/detail/nn_descent.cuh.
  • Remove the internal_distance_dtype parameter from the C++, C, and Python index params.

Related

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.