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

Remove overallocation in faiss query path #501

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

jmazanec15
Copy link
Member

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

  • Commits are signed as per the DCO using --signoff

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.

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>
@jmazanec15 jmazanec15 added Bug Fixes Changes to a system or product designed to handle a programming bug/glitch backport 2.x labels Aug 8, 2022
@jmazanec15 jmazanec15 requested a review from a team August 8, 2022 21:49
Comment on lines +195 to +196
std::vector<float> dis(kJ);
std::vector<faiss::Index::idx_t> ids(kJ);
Copy link
Collaborator

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the comment.

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2022

Codecov Report

Merging #501 (d55ea5f) into main (641614d) will not change coverage.
The diff coverage is n/a.

@@            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>
@jmazanec15 jmazanec15 merged commit 507bafe into opensearch-project:main Aug 8, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 8, 2022
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)
@navneet1v navneet1v added the 2.3.0 label Sep 7, 2022
@heemin32 heemin32 added v2.3.0 'Issues and PRs related to version v2.3.0' and removed 2.3.0 labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Bug Fixes Changes to a system or product designed to handle a programming bug/glitch v2.3.0 'Issues and PRs related to version v2.3.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants