Skip to content

Dense vector storage based on universal I/O IoUringFile - #8452

Merged
ffuugoo merged 14 commits into
devfrom
io-uring-vector-storage
Mar 20, 2026
Merged

ffuugoo merged 14 commits into
devfrom
io-uring-vector-storage

Conversation

@ffuugoo

@ffuugoo ffuugoo commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor

Refactor MemmapDenseVectorStorage into DenseVectorStorageImpl that can use different universal I/O backends and add VectorStorageEnum:: DenseUring variants for IoUringFile vector storage impls.

So far, I've left separate async_raw_scorer, so that refactoring does not affect other storage types.

Last two commits are renames/cleanups with no logic changes.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --workspace --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@ffuugoo
ffuugoo requested review from coszio, generall and xzfc March 19, 2026 09:37
@ffuugoo

ffuugoo commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Draft for now, let's see if tests pass. 😬

@generall

Copy link
Copy Markdown
Member

does more generics affect compile time?

@ffuugoo

ffuugoo commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor Author

does more generics affect compile time?

No idea. Did not even think about it. I do not expect it to be noticeable, though, we only added 3 new instantiations (vector storage for f32/uring, f16/uring and u8/uring).

@ffuugoo
ffuugoo marked this pull request as ready for review March 19, 2026 12:40
@coderabbitai

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

/// Tries to utilize asynchronous IO if possible.
/// In particular, uses io_uring on Linux and simple synchronous IO otherwise.
pub fn read_vectors_async(
pub fn read_vectors_async<P: AccessPattern>(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this _async suffix is kinda legacy now that it depends on the IO backend, doesn't it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I just wanted to minimize changes in the PR. I plan to refactor async_raw_scorer later, and will clean this up as well.

Comment on lines +31 to +34
CosineMetric: Metric<T>,
EuclidMetric: Metric<T>,
DotProductMetric: Metric<T>,
ManhattanMetric: Metric<T>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I hate we have to do this... Eagerly waiting for reverse implied bounds

coderabbitai[bot]

This comment was marked as duplicate.

@ffuugoo
ffuugoo force-pushed the io-uring-vector-storage branch from 7d29e0f to 70070d8 Compare March 19, 2026 21:04
@ffuugoo
ffuugoo merged commit 04e9bbc into dev Mar 20, 2026
15 checks passed
@ffuugoo
ffuugoo deleted the io-uring-vector-storage branch March 20, 2026 10:16
@generall generall added this to the Universal IO milestone Mar 26, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Mar 31, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Apr 15, 2026
6 of 9 tasks
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.

4 participants