-
Notifications
You must be signed in to change notification settings - Fork 140
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
Remove overallocation in faiss query path #501
Conversation
Removes overallocation of 2 c++ vectors in faiss querying functionality. Performance results can be viewed in [497](opensearch-project#497 (comment)). In general, this change could provide a small improvement in memory footprint during search workloads. Signed-off-by: John Mazanec <jmazane@amazon.com>
std::vector<float> dis(kJ); | ||
std::vector<faiss::Index::idx_t> ids(kJ); |
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.
add a comment on top of this change what it is doing and why it is required.
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.
Added the comment.
Codecov Report
@@ Coverage Diff @@
## main #501 +/- ##
=========================================
Coverage 84.04% 84.04%
Complexity 1019 1019
=========================================
Files 146 146
Lines 4188 4188
Branches 373 373
=========================================
Hits 3520 3520
Misses 492 492
Partials 176 176 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: John Mazanec <jmazane@amazon.com>
Removes overallocation of 2 c++ vectors in faiss querying functionality. Performance results can be viewed in [497](#497 (comment)). In general, this change could provide a small improvement in memory footprint during search workloads. Signed-off-by: John Mazanec <jmazane@amazon.com> (cherry picked from commit 507bafe)
Description
Removes overallocation of 2 c++ vectors in faiss querying functionality.
Performance results can be viewed in 497.
In general, this change could provide a small improvement in memory
footprint during search workloads.
Issues Resolved
#497
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.