Add AVX512 support to k-nn FAISS#2069
Add AVX512 support to k-nn FAISS#2069akashsha1 wants to merge 76 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
|
@akashsha1 Can you also update .github/workflows/CI.yml and .github/workflows/test_security.yml to detect if avx512 is supported or not and pass the flag to gradle. Also, pls add an entry in CHANGELOG for this PR and sign off the PR to fix DCO check. Thanks! |
|
Can you also please update build script to build all 3 versions of faiss lib for the distribution. Pls change this block of code like shown below |
|
@akashsha1 You also need to add the avx512 faiss library in plugin-security.policy to provide runtime permissions for loading the library. Pls test end to end after making all these changes. Thanks! |
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Co-authored-by: Naveen Tatikonda <navtat@amazon.com> Signed-off-by: akashsha1 <113050768+akashsha1@users.noreply.github.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
|
@akashsha1 Looks like some of the commits were not properly signed causing the DCO to fail. Do you want to rebase and squash everything into a single commit and sign that commit ? |
|
@akashsha1 We need to add the CPU flag detection logic in these 2 workflows and pass the gradle flags to fix the failing checks |
Co-authored-by: Naveen Tatikonda <navtat@amazon.com> Signed-off-by: akashsha1 <113050768+akashsha1@users.noreply.github.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
* Add HNSW changes to support Faiss byte vector Signed-off-by: Naveen Tatikonda <navtat@amazon.com> * Address Review Comments Signed-off-by: Naveen Tatikonda <navtat@amazon.com> * Add IVF changes to support Faiss byte vector Signed-off-by: Naveen Tatikonda <navtat@amazon.com> * Address Review Comments Signed-off-by: Naveen Tatikonda <navtat@amazon.com> --------- Signed-off-by: Naveen Tatikonda <navtat@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…pensearch-project#2020) starting 2.17 This removes the feature flag for the same Signed-off-by: Tejas Shah <shatejas@amazon.com>
…ensearch-project#2018) Signed-off-by: Tejas Shah <shatejas@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…ch-project#2025) Signed-off-by: Navneet Verma <navneev@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Introduces new params for mapping and training, called compression_level and mode. These parameters are high level parameters that give the plugin a hint as to what the user wants to configure their system like without exposing algorithmic details. This change just adds these parameters to the plugin as noops. In future change, we will add the functionality for parameter resolution. Along with this, I added a class to more easily manage the original parameters that a user passes. This will help ensure our mapper maintains good compatibility. Signed-off-by: John Mazanec <jmazane@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Naveen Tatikonda <navtat@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Add quantization state reader and writer Signed-off-by: Ryan Bogan <rbogan@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
) * Introduce mode and compression param resolution Adds mode and compression based parameter resolution. With this, if a user specifies the mode and/or compression params, we will create a default configuration with the aim of meeting those hints. Currently, it does not contain support for overriding any of the parameters. This will be taken in a future commit. Signed-off-by: John Mazanec <jmazane@amazon.com> * Modify reader changes Signed-off-by: John Mazanec <jmazane@amazon.com> --------- Signed-off-by: John Mazanec <jmazane@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Ryan Bogan <rbogan@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…pensearch-project#2044) * Add spaceType as a top level parameter while creating vector field. Signed-off-by: Navneet Verma <navneev@amazon.com> * fix release notes Signed-off-by: John Mazanec <jmazane@amazon.com> * Remove commented out code Signed-off-by: John Mazanec <jmazane@amazon.com> --------- Signed-off-by: Navneet Verma <navneev@amazon.com> Signed-off-by: John Mazanec <jmazane@amazon.com> Co-authored-by: John Mazanec <jmazane@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…eted docs in it (opensearch-project#2046) Signed-off-by: Navneet Verma <navneev@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…o be from cluster metadata (opensearch-project#2005) * Add model version to model metadata Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Add model version to model metadata and change model metadata reads to be from cluster metadata Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Add changelog entry Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Set version from config context Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Fix spotless Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Update model index mappings Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Change field mapper to read model version Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Fix tests Signed-off-by: Ryan Bogan <rbogan@amazon.com> * remove println Signed-off-by: John Mazanec <jmazane@amazon.com> --------- Signed-off-by: Ryan Bogan <rbogan@amazon.com> Signed-off-by: John Mazanec <jmazane@amazon.com> Co-authored-by: John Mazanec <jmazane@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…ns (opensearch-project#2058) Signed-off-by: Navneet Verma <navneev@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…2062) Signed-off-by: Ryan Bogan <rbogan@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…de (opensearch-project#2055) Signed-off-by: Tejas Shah <shatejas@amazon.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Co-authored-by: Naveen Tatikonda <navtat@amazon.com> Signed-off-by: akashsha1 <113050768+akashsha1@users.noreply.github.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
Co-authored-by: Naveen Tatikonda <navtat@amazon.com> Signed-off-by: akashsha1 <113050768+akashsha1@users.noreply.github.com> Signed-off-by: Akash Shankaran <akash.shankaran@intel.com>
…into intel/avx512faiss
|
Hi @naveentatikonda - please consider this PR: #2110 in favor of the current one. The rebasing due to DCO sign-off got messy, so I created a new PR instead. It has all feedback addressed to this point, except the workflow failures which needs to be resolved. |
This needs to be addressed in #2110 .. |

Description
This change adds support to speed up vector search and indexing in faiss using AVX512 hardware accelerator.
Related Issues
Resolves #2056
Check List
--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.