Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QST] Is there a two_pass_precision mode for brute force knn? #333

Open
phact opened this issue Sep 18, 2024 · 2 comments
Open

[QST] Is there a two_pass_precision mode for brute force knn? #333

phact opened this issue Sep 18, 2024 · 2 comments
Labels
question Further information is requested

Comments

@phact
Copy link

phact commented Sep 18, 2024

My project uses RAFT brute force knn and I noticed a drop in precision when I upgraded to the latest RAFT. I moved to cuvs but still see cosine similarity that's off by more than 1e-04 when compared to the dot product cpu calculation. Is this a bad use case for cuvs?

I had this issue before when I was using cuML and two_pass_precission fixed it, unfortunately it also suffered from a different correctness bug rapidsai/cuml#5569. Would appreciate any suggestions.

@phact phact added the question Further information is requested label Sep 18, 2024
@cjnolet
Copy link
Member

cjnolet commented Sep 18, 2024

Thanks for creating an issue about this @phact. can you share a little more info about how you are using this? Are you using the Python API? What precision is your data? (float or double?). If it's not too hard to provide a trivial reproducible example then that would be helpful.

Sometimes this can be caused my multiple sources of small precision errors throughout the computational stack- inner product can mount small errors, then follow-on arithmetic can make things slightly worse. We will work to get this fixed if you can help us understand more.

@phact
Copy link
Author

phact commented Sep 19, 2024

Thanks for the reply @cjnolet

Yes, it's the python API using float32 (I checked and looks like double isn't supported).

I'll take a stab at a minimum reproducible example. Is there a plan to have two modes (one fast/lossy and one for high precision)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants