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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

naveentatikonda
Copy link
Member

Description

Add avx512_spr documentation, the advanced avx512 instructions for Intel® Sapphire Rapids or a newer-generation processors on x64 architecture to boost the performance of hamming distance and fp16 computations.

Issues Resolved

Closes #9108

Version

2.19

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

github-actions bot commented Feb 3, 2025

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@@ -64,18 +68,21 @@ 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.so`: The non-optimized Faiss library without SIMD instructions.
- `libopensearchknn_faiss_avx512_spr.so`: The Faiss library containing advanced AVX512 SIMD instructions for Intel® Sapphire Rapids or a newer-generation processor.
Copy link
Contributor

Choose a reason for hiding this comment

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

newer-generation processor, available on public clouds such as AWS on c/m/r 7i or newer instances.

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if we can mention about AWS on opensource documentation, @kolchfa-aws do you know ?

Instead shall we mention the CPU flags like "newer-generation processor with CPU flags avx512_fp16, avx512_bf16, avx512_vpopcntdq" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

most customers reading this doc will try opensearch and its features on some public cloud. They're unlikely to understand intel product family names like 'Sapphire Rapids' etc. Hence the c/m/r7i would be helpful to them to pick the right product I thought.

I think its better to skip the CPU flag details. It's very low level system details, and it'll create more confusion to a reader of opensearch.

Copy link
Member Author

Choose a reason for hiding this comment

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

got it, will update. Thanks!

Signed-off-by: Naveen Tatikonda <[email protected]>
@naveentatikonda naveentatikonda force-pushed the add_avx512_spr_documentation branch from d706841 to 967ef6c Compare February 4, 2025 03:30
@naveentatikonda
Copy link
Member Author

@kolchfa-aws Can you pls review this PR. Thanks!

Signed-off-by: Fanit Kolchina <[email protected]>
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.

Signed-off-by: Fanit Kolchina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Update k-NN plugin documentation to reflect AVX512_spr SIMD optimization update
3 participants