Description
matrix::select_k
uses a heuristic to select one among several implementations depending on the input arguments.
The problem is that some of the implementation have a special handling of max_bound/min_bound (inifinity
) values; they may replace the corresponding indices (payload) with special values, such as zero or numeric_limit<T>::max()
.
This problem manifests itself when the number of valid (non-infinity) values is less than k
. Example: IVF-PQ may return many infinities if the low-precision internal types are used; if the refinement used afterwards, it can return the zeroth vector from the database multiple times.
This can be tested in the newly added tests:
raft/cpp/test/matrix/select_k.cuh
Lines 240 to 243 in ea160fa
This listing summarizes what indices (payloads) do different implementation return:
raft/cpp/test/matrix/select_k.cuh
Lines 258 to 274 in ea160fa
Activity