-
Notifications
You must be signed in to change notification settings - Fork 550
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
Approximate Nearest Neighbors #2780
Approximate Nearest Neighbors #2780
Conversation
Please update the changelog in order to start CI tests. View the gpuCI docs here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm super excited to start supporting approximate algorithms in cuml. Just took a quick look and added some initial feedback
22d9ffa
to
132acab
Compare
@WXBN have you collected any timings on these indices vs the brute force indices? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good so far. I did a first-pass through the code.
@@ -36,36 +38,87 @@ enum MetricType { | |||
METRIC_Correlation | |||
}; | |||
|
|||
struct knnIndex { | |||
faiss::gpu::StandardGpuResources *gpu_res; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either before or shortly after this PR is merged, we need to update FAISS in cuML and use their new pluggable memory manager feature (facebookresearch/faiss#1203). While the brute-force computation uses only a very small workspace, the approximate Index
variants put FAISS in complete control of the memory space of the index (through the StandardGPUResources
).
Sorry, I forgot about this one. Sure it's probably preferable to defer it to 0.18. Also, I'll have to check again the automatic choice of parameters and maybe move it to Python code. |
The code was updated to current |
@viclafargue, it looks like CI ran out of space in the tests. The tests also look pretty exhautive in terms of parameters. Any opportunities to prune the parameter grid?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@viclafargue, I think the changelog is automatic now. Can you remove the changelog update? |
Talked to Victor and offered to make the changelog update so we can get this in. |
rerun tests |
This PR will enable the usage of multiple KNN strategies as alternatives to the current default bruteforce method. See #574