Skip to content

Add FingerprintSearchIndex for exact top-k fingerprint similarity search - #383

Open
scal444 wants to merge 2 commits into
NVIDIA-BioNeMo:mainfrom
scal444:feat/fingerprint-knn-core
Open

scal444 wants to merge 2 commits into
NVIDIA-BioNeMo:mainfrom
scal444:feat/fingerprint-knn-core

Conversation

@scal444

@scal444 scal444 commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

The index copies a library of packed fingerprints to the GPU sorted by popcount and returns the k most similar entries per query without materializing the query x library similarity matrix. Each block scans library rows near its queries' popcounts first and expands outward until the popcount bound rules out further hits. Results are exact (double scores, ordered by score then library index); prune=false scans every row. searchSelf searches the library against itself, excluding self matches.

The index copies a library of packed fingerprints to the GPU sorted by
popcount and returns the k most similar entries per query without
materializing the query x library similarity matrix. Each block scans
library rows near its queries' popcounts first and expands outward until
the popcount bound rules out further hits. Results are exact (double
scores, ordered by score then library index); prune=false scans every row.
searchSelf searches the library against itself, excluding self matches.

Tested against a CPU brute-force reference for both metrics, with and
without pruning, including self search, padding, and empty or invalid
inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain.

Summary

Adds FingerprintSearchIndex for exact GPU top-k fingerprint searches without storing the full similarity matrix.

  • Fingerprint searches return the closest library rows without building a full score matrix.

Reviews (2) · Last reviewed commit: "Merge branch 'upstream-main' into feat/f..." · Reviewed by Greptile

Comment thread src/fingerprint_search.h
@scal444
scal444 requested a review from geekysuavo October 28, 2026 19:20
# Conflicts:
#	src/CMakeLists.txt
#	tests/CMakeLists.txt

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant