Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hhy3 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@hhy3 Please associate the related issue to the body of your Pull Request. (eg. “issue: #”) |
src/common/comp/brute_force.cc
Outdated
| std::unique_ptr<float[]> norms = nullptr; | ||
| if (is_cosine) { | ||
| norms = std::make_unique<float[]>(nb); | ||
| faiss::fvec_norms_L2(norms.get(), (const float*)xb, dim, nb); |
There was a problem hiding this comment.
Is it possible to calculate this from origin data directly? the xb could be much large and concurrent search requests will copy many data to run out of memory
There was a problem hiding this comment.
To my understanding, we search growing chunk by chunk, which means the nb cannot be bigger than 1024. So 4KB memory is needed for each search.
The reason why put it here is to accelerate the calculation when nq is big
There was a problem hiding this comment.
@liliu-z the sealed segment without index will also go brute force, and the sealed segment is with only 1 chunk, which with size of all rows
There was a problem hiding this comment.
@liliu-z the sealed segment without index will also go brute force, and the sealed segment is with only 1 chunk, which with size of all rows
Good catch!
|
|
a661b44 to
70634fc
Compare
|
/kind improvement |
Signed-off-by: zh Wang <zihao.wang@zilliz.com>
No description provided.