-
Notifications
You must be signed in to change notification settings - Fork 197
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
Make IVF-PQ build index in batches when necessary #1056
Make IVF-PQ build index in batches when necessary #1056
Conversation
run tests |
…d out-of-memory exceptions at the cost of longer build times
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.
Thanks Artem for this PR! It is a larger refactoring of the index building, and it is nice to see the improved modularity of the extend method as a result. See my comments below.
…inearly with the batch size
…dex size is too big
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.
Thanks Artem for the updates! It is great that the functions to store the encoded datasets can be replaced with more concise and faster kernels! The PR looks good to me.
Codecov ReportBase: 87.68% // Head: 87.68% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## branch-23.02 #1056 +/- ##
=============================================
Coverage 87.68% 87.68%
=============================================
Files 20 20
Lines 471 471
=============================================
Hits 413 413
Misses 58 58 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
WIP: there's a bug somewhere, which makes the recall drop non-deterministically in tests. |
Update: the root of the problem was that the |
/merge |
Before this patch, when the input data was not accessible directly from the device, the
build
andextend
functions mapped it using thecudaHostRegister
. Although this approach was rather fast, it could fail when the input data is too large to fit in the device memory.This PR, changes the logic of
build
andextend
, so that the data is loaded in batches when necessary. Moreover, when the passed pointer represents the mapped file (e.g. using the system callmmap
), the size of the input may even be larger than the host memory.The
build
does one pass through the input (to sample the training set), and theextend
does at most two passes.