-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add FAISS with RAFT enabled Benchmarking to raft-ann-bench #2026
Conversation
/ok to test |
/ok to test |
/ok to test |
/ok to test |
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.
Hi Tarang, looks good, but one issue is not addressed yet.
@@ -208,7 +234,7 @@ void FaissGpu<T>::build(const T* dataset, size_t nrow, cudaStream_t stream) | |||
nlist_, | |||
index_ivf->cp.min_points_per_centroid); | |||
} | |||
index_ivf->cp.max_points_per_centroid = max_ppc; | |||
index_ivf->cp.max_points_per_centroid = 300; |
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.
Could you change it back to max_ppc
?
base: | ||
build: | ||
nlist: [2048] | ||
ratio: [1, 4, 10] |
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.
I would not add multiple build ratios, just pick one.
/ok to test |
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.
Thanks for the updates, the PR looks good to me.
/ok to test |
1 similar comment
/ok to test |
/merge |
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.
Approving on behalf of packaging-codeowners
. I just narrowly looked at packaging concerns here, not the functional changes.
@@ -115,4 +116,4 @@ endfunction() | |||
find_and_configure_faiss( | |||
BUILD_STATIC_LIBS ${RAFT_USE_FAISS_STATIC} | |||
ENABLE_GPU ${RAFT_FAISS_ENABLE_GPU} | |||
) | |||
) |
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.
I noticed several files in this PR that do not end with a newline.
In practice I've found that this rarely matters, but it can occasionally cause issues for tools doing line-by-line parsing of files. In a future PR, you may want to consider automatically fixing these with pre-commit
, like cudf
does: https://github.com/rapidsai/cudf/blob/107753ccaacdb62287c4dd4351e5caf3bf8bc62a/.pre-commit-config.yaml#L13
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.
aside from a couple super minor nitpicks - lgtm! Preapproving,
|
||
|
||
def faiss_gpu_ivf_pq_build_constraints(params, dims): | ||
ret = True |
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.
ret = True |
pq_bits = 8 | ||
if "bitsPerCode" in params: | ||
pq_bits = params["bitsPerCode"] |
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.
nitpick:
pq_bits = 8 | |
if "bitsPerCode" in params: | |
pq_bits = params["bitsPerCode"] | |
pq_bits = params.get("bitsPerCode", 8) |
faiss_gpu_ivf_flat
,faiss_gpu_ivf_pq
get_faiss.cmake
Notes: The
StandardGpuResources
object is part of FAISS' index classes. As a result, there is no way of creating a separate Raft handle for each thread without creating a new instance of the whole index object for a new thread. As such, multi-threaded benchmarking for GPU indices will not work.For CPU indices, @divyegala had seen some other issues. Though this PR is mainly about raft-enabled FAISS GPU indices.