NVIDIA / NVIDIA/cuvs

Use half2 and float2 types/operators for Vamana build L2 metrics

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

Nobody has claimed this yet.

Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

The Vamana index build has several different L2 comparator methods based on the dataset dimension and datatype. For large dimensions, each thread loads several values and accumulates the total to increase ILP, but each value is loaded independently. For the __half and float types we can improve performance by using the half2 and float2 types and using the __hfma2, __hsub2, __fmaf2, and __fsub2 operators to calculate and accumulate the L2 distnace.

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

Start by locating the Vamana index-build L2 comparator methods for large dimensions and the __half and float paths. Compare how values are currently loaded and accumulated, then verify that the relevant paths use half2 or float2 with the named operators and preserve correct L2 distance results.

Written by the indexing model from the issue text.

Assessment

Domain
performance, search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.