Instantiate uint64_t IndexType for CAGRA search kernels#2190
Instantiate uint64_t IndexType for CAGRA search kernels#2190divyegala wants to merge 4 commits intorapidsai:branch-24.04from
uint64_t IndexType for CAGRA search kernels#2190Conversation
|
/rerun tests |
|
Looks like the |
|
Thanks Divye for this PR! Currently
The goal of this PR is to change 1. to
Considering these issues I would recommend to separate these concerns, and modify only the output index type (1.) This can be easily done by introducing an extra output index template parameter, and an elementwise op to cast the index type if necessary. This is already used in our benchmark, so our benchmark times already include this overhead: raft/cpp/bench/ann/src/raft/raft_cagra_wrapper.h Lines 283 to 289 in 7342980 If we have any performance consideration with additional kernel call, then I would recommend to add a follow-up task to improve that. One could add the cast when
While changing single-cta kernel, one should watch out for binary size: we can do a runtime type dispatch without introducing an additional template parameter. |
|
@tfeher thanks for the detailed writeup! I agree with you that we should limit the changes just to the |
Depends. If you anyways have to map the neighbor idx data in the faiss integration (e.g. marking invalid values according to faiss expectation), then it sounds fine to me to do the mapping in faiss. Otherwise I would prefer to do the cast in |
@tfeher I'm not sure what this means. When would values be invalid in faiss? |
These instantiations are required in facebookresearch/faiss#3084 to link to precompiled CAGRA binaries from
libraft.so