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

Add avx512_spr documentation #9148

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions _search-plugins/knn/knn-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ Starting with k-NN plugin version 2.19, you can use `binary` vectors with the `l

## SIMD optimization for the Faiss engine

Starting with version 2.13, the k-NN plugin supports [Single Instruction Multiple Data (SIMD)](https://en.wikipedia.org/wiki/Single_instruction,_multiple_data) processing if the
underlying hardware supports SIMD instructions (AVX2 on x64 architecture and Neon on ARM64 architecture). SIMD is supported by default on Linux machines only for the Faiss engine.
SIMD architecture helps boost overall performance by improving indexing throughput and reducing search latency. Starting with version 2.18, the k-NN plugin supports AVX512 SIMD
instructions on x64 architecture and from version 2.19, the k-NN plugin supports advanced AVX512 SIMD instructions on x64 architecture if underlying system is an Intel® Sapphire
Rapids or a newer-generation processor which will boost the performance of hamming distance and fp16 computation.
Starting with version 2.13, the k-NN plugin supports [Single Instruction Multiple Data (SIMD)](https://en.wikipedia.org/wiki/Single_instruction,_multiple_data) processing if the underlying hardware supports SIMD instructions (AVX2 on x64 architecture and Neon on ARM64 architecture). SIMD is supported by default on Linux machines only for the Faiss engine. SIMD architecture helps boost overall performance by improving indexing throughput and reducing search latency. Starting with version 2.18, the k-NN plugin supports AVX512 SIMD instructions on x64 architecture. Starting with version 2.19, the k-NN plugin supports advanced AVX512 SIMD instructions on x64 architecture for Intel Sapphire Rapids or a newer generation processor, improving the performance of Hamming distance and FP16 computation.
Copy link
Member Author

Choose a reason for hiding this comment

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

Can you change the last line to improving the performance of Hamming distance computation. ?

As of now, looks like fp16 optimization is not yet added so let us remove it.


SIMD optimization is applicable only if the vector dimension is a multiple of 8.
{: .note}
Expand All @@ -68,7 +64,7 @@ SIMD optimization is applicable only if the vector dimension is a multiple of 8.

For x64 architecture, the following versions of the Faiss library are built and shipped with the artifact:

- `libopensearchknn_faiss_avx512_spr.so`: The Faiss library containing advanced AVX512 SIMD instructions for newer-generation processor, available on public clouds such as AWS on c/m/r 7i or newer instances.
- `libopensearchknn_faiss_avx512_spr.so`: The Faiss library containing advanced AVX512 SIMD instructions for newer generation processors, available on public clouds such as AWS for c/m/r 7i or newer instances.
kolchfa-aws marked this conversation as resolved.
Show resolved Hide resolved
- `libopensearchknn_faiss_avx512.so`: The Faiss library containing AVX512 SIMD instructions.
- `libopensearchknn_faiss_avx2.so`: The Faiss library containing AVX2 SIMD instructions.
- `libopensearchknn_faiss.so`: The non-optimized Faiss library without SIMD instructions.
Expand All @@ -82,7 +78,7 @@ If your hardware supports AVX512, the k-NN plugin loads the `libopensearchknn_fa

If your hardware supports AVX2 but doesn't support AVX512, the k-NN plugin loads the `libopensearchknn_faiss_avx2.so` library at runtime.

To disable the advanced AVX512(spr), AVX512 and AVX2 SIMD instructions and load the non-optimized Faiss library (`libopensearchknn_faiss.so`), specify the `knn.faiss.avx512_spr.disabled`, `knn.faiss.avx512.disabled` and `knn.faiss.avx2.disabled` static settings as `true` in `opensearch.yml` (by default, both of these are `false`).
To disable the advanced AVX512 (for Sapphire Rapids or newer generation processors), AVX512, and AVX2 SIMD instructions and load the non-optimized Faiss library (`libopensearchknn_faiss.so`), specify the `knn.faiss.avx512_spr.disabled`, `knn.faiss.avx512.disabled` and `knn.faiss.avx2.disabled` static settings as `true` in `opensearch.yml` (by default, all of these are `false`).
kolchfa-aws marked this conversation as resolved.
Show resolved Hide resolved

Note that to update a static setting, you must stop the cluster, change the setting, and restart the cluster. For more information, see [Static settings]({{site.url}}{{site.baseurl}}/install-and-configure/configuring-opensearch/index/#static-settings).

Expand Down