Skip to content

Fix gpu for empty payload block #5821 - #5847

Merged
IvanPleshkov merged 4 commits into
devfrom
fix-gpu-for-empty-payload-block-#5821
Jan 23, 2025
Merged

IvanPleshkov merged 4 commits into
devfrom
fix-gpu-for-empty-payload-block-#5821

Conversation

@IvanPleshkov

@IvanPleshkov IvanPleshkov commented Jan 22, 2025 •

Copy link
Copy Markdown
Contributor

Fix #5821

A bug appeared because the empty payload index try to create an empty hnsw index for additional links. I'm not sure that an empty payload index should have non-empty payload blocks, but I decided to fix it on GPU size.

This PR allows to create an empty GPU vector storage and handle the case when where are no any points to create hnsw index on GPU.

Also, I refactored GPU resources initialization to avoid shader compilation when the amount of points is not enough to start GPU indexing (remainder: first points are indexed by CPU).

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 --all --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?

@timvisee timvisee left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please see my review comments, no other remarks assuming this fixes the problem.

The CI failure will be fixed by rebasing on dev since #5846 is merged.

Comment thread lib/gpu/src/buffer.rs Resolved
@IvanPleshkov
IvanPleshkov force-pushed the fix-gpu-for-empty-payload-block-#5821 branch from bd13435 to 4e08f60 Compare January 22, 2025 20:47
@IvanPleshkov
IvanPleshkov marked this pull request as ready for review January 22, 2025 22:18
@IvanPleshkov
IvanPleshkov merged commit d874ccb into dev Jan 23, 2025
@IvanPleshkov
IvanPleshkov deleted the fix-gpu-for-empty-payload-block-#5821 branch January 23, 2025 09:51
timvisee pushed a commit that referenced this pull request Jan 23, 2025
* fix #5821

* allow empty gpu buffers and fix ci test with empty vector storage

* remove unnecessary check

* allow empty vector storage on higher level
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.

3 participants