Skip to content

perf: optimize SINDI IP and BM25 SVE kernels - #1815

Merged
sre-ci-robot merged 1 commit into
zilliztech:mainfrom
chasingegg:codex/optimize-sindi-sve-kernels
Sep 10, 2026
Merged

perf: optimize SINDI IP and BM25 SVE kernels#1815
sre-ci-robot merged 1 commit into
zilliztech:mainfrom
chasingegg:codex/optimize-sindi-sve-kernels

Conversation

@chasingegg

@chasingegg chasingegg commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

issue: #1730

  • Optimize the SINDI IP SVE kernel by splitting packed uint16_t local IDs with and/lsr, issuing independent gathers together, and marking independent pointer arguments restrict.
  • Optimize the SINDI BM25 SVE kernel with direct zero-extending halfword loads into 32-bit lanes and a simpler predicated contiguous tail.
  • Keep the implementation compatible with base SVE (armv8.2-a+sve); this PR does not require SVE2.

Benchmark

Host: 8-core Arm Neoverse V2, 128-bit SVE; 256 deterministic queries, 8 search threads, one warm-up and five timed rounds. QPS values are geometric means across two benchmark processes.

sparse_embedding.parquet (2,751,968 rows / 616,335,749 nonzeros):

Metric Query NNZ Top10 gain Top100 gain
IP 10 +4.10% +7.03%
IP 20 +5.94% +5.52%
IP 50 +4.94% +4.80%
BM25 10 +10.33% +10.29%
BM25 20 +9.93% +11.02%
BM25 50 +8.80% +10.07%

The six-case geometric-mean gain is +5.38% for IP and +10.07% for BM25. Across MS MARCO, NQ, HotpotQA, and FEVER, BM25 gains +1.71% on original queries and +4.48% on synthetic NNZ 10/20/50 queries.

Verification

  • Built knowhere successfully with the release configuration.
  • Compiled the changed translation unit with -march=armv8.2-a+sve; disassembly contains no SVE2 fcvtlt instruction.
  • IP scalar/SVE output arrays and maximum scores are exactly identical across posting-list boundary sizes through 65,535 entries.
  • BM25 old/new SVE output arrays and maximum scores are exactly identical; scalar/SVE error is at most 1e-5.
  • End-to-end result ID/distance hashes are unchanged in the before/after benchmark runs.

@sre-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chasingegg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify

mergify Bot commented Sep 10, 2026

Copy link
Copy Markdown

@chasingegg 🔍 Important: PR Classification Needed!

For efficient project management and a seamless review process, it's essential to classify your PR correctly. Here's how:

  1. If you're fixing a bug, label it as kind/bug.
  2. For small tweaks (less than 20 lines without altering any functionality), please use kind/improvement.
  3. Significant changes that don't modify existing functionalities should be tagged as kind/enhancement.
  4. Adjusting APIs or changing functionality? Go with kind/feature.

For any PR outside the kind/improvement category, ensure you link to the associated issue using the format: “issue: #”.

Thanks for your efforts and contribution to the community!.

Signed-off-by: chasingegg <gaoc96@qq.com>
@alexanderguzhva

Copy link
Copy Markdown
Collaborator

/lgtm

@sre-ci-robot
sre-ci-robot merged commit 9518599 into zilliztech:main Sep 10, 2026
13 checks passed
@chasingegg
chasingegg deleted the codex/optimize-sindi-sve-kernels branch September 11, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants