-
Notifications
You must be signed in to change notification settings - Fork 42
Search to add a separate allocator #716
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
Conversation
Codecov ReportAttention: Patch coverage is ❌ Your project status has failed because the head coverage (88.73%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. @@ Coverage Diff @@
## main #716 +/- ##
==========================================
- Coverage 88.78% 88.73% -0.05%
==========================================
Files 198 199 +1
Lines 12650 12693 +43
==========================================
+ Hits 11231 11263 +32
- Misses 1419 1430 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
1895dcc
to
c76bab7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/index/hnsw.cpp
Outdated
@@ -234,6 +235,7 @@ HNSW::knn_search(const DatasetPtr& query, | |||
ret->Dim(0)->NumElements(1); | |||
return ret; | |||
} | |||
vsag::Allocator* search_alloctor = allocator == nullptr ? allocator_.get() : allocator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: search_allocator
@@ -35,7 +35,8 @@ class SparseVectorDataCell : public FlattenInterface { | |||
Query(float* result_dists, | |||
const ComputerInterfacePtr& computer, | |||
const InnerIdType* idx, | |||
InnerIdType id_count) override { | |||
InnerIdType id_count, | |||
Allocator* allocator = nullptr) override { | |||
auto comp = std::static_pointer_cast<Computer<QuantTmpl>>(computer); | |||
this->query(result_dists, comp, idx, id_count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wxyucs Here need add param allocator
to use custom allocator ?
this->query(result_dists, comp, idx, id_count, allocator);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Search allocator is not used inside query
Signed-off-by: zourunxin.zrx <[email protected]>
No description provided.