Repository navigation
Refactor Multi*QueryScorer for (future) io_uring support - #8702
Merged
Merged
Conversation
…h_multi`... ...and propagate micro-batching from `Multi*QueryScorer` into `AppendableMmapMultiDenseVectorStorage`
…lti`... ...to delegate to `ChunkedVectors::for_each_in_batch` and `iter`
ffuugoo
force-pushed
the
universal-multi-scorer
branch
from
April 20, 2026 11:55
ab0a1df to
ce1432f
Compare
ffuugoo
marked this pull request as ready for review
April 20, 2026 14:24
This comment was marked as resolved.
This comment was marked as resolved.
generall
approved these changes
Apr 20, 2026
xzfc
approved these changes
Apr 20, 2026
Comment on lines
-118
to
+120
| let mut vectors = [const { MaybeUninit::uninit() }; VECTOR_READ_BATCH_SIZE]; | ||
| let vectors = self | ||
| .vector_storage | ||
| .get_batch_multi(ids, &mut vectors[..ids.len()]); | ||
|
|
||
| let total_read = vectors.iter().map(|v| v.as_ref().vectors_count()).sum(); | ||
| let vectors_read = self.hardware_counter.vector_io_read(); | ||
| self.vector_storage | ||
| .for_each_in_batch_multi(ids, |idx, vector| { | ||
| vectors_read.incr_delta(vector.vectors_count()); | ||
| scores[idx] = self.score_ref(vector); | ||
| }); |
Member
There was a problem hiding this comment.
Quick benchmark shows that this change doesn't affect the performance which is good.
(not related to this PR →) Tho I'm still wonder about similar changes for non-multi-vector usages of the same pattern ([MaybeUninit; VECTOR_READ_BATCH_SIZE]).
Remove `fmt::Display` requirement from `VectorOffset` trait
…atch_multi`... Add explanation comment
7 of 11 tasks
This was referenced Apr 27, 2026
Merged
timvisee
pushed a commit
that referenced
this pull request
May 8, 2026
This was referenced May 22, 2026
This was referenced Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to #8685, this PR adds a code path, that correctly (i.e., efficient for io_uring) utilizes universal I/O to
Multi*QueryScorers/MultiVectorStorage/ChunkedVectors.TODO:
All Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
cargo +nightly fmt --allcommand prior to submission?cargo clippy --workspace --all-featurescommand?Changes to Core Features: