Repository navigation
[FEA] Binary IVF Flat Index - #1099
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
…nto binary-kmeans
This reverts commit 63eea1b.
|
/ok to test 5e6db22 |
@tarang-jain, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 5e6db22 |
tfeher
left a comment
There was a problem hiding this comment.
Thanks Tarang for addressing my questions. The PR looks good to me.
KyleFromNVIDIA
left a comment
There was a problem hiding this comment.
JIT+LTO changes look reasonable to me
|
Notes: after a lot of discussion offline, we have brought back design 2:
|
|
/ok to test ad67e8b |
@tarang-jain, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test ad67e8b |
|
/ok to test 6c393a7 |
|
/ok to test 8dae48a |
|
/merge |
Depends on NVIDIA/raft#2770
Implementation of binary ivf flat index (bitwise hamming metric for the IVF Flat index)
Key Features
1. Binary Index Structure
binary_centers_field to store cluster centers as packeduint8_tarrays for binary datauint8_tinputs with BitwiseHamming and add only single instantiations of newly added kernels2. K-means Clustering for Binary Data
The clustering approach for binary data required special handling:
Expanded Space Clustering: Binary data (uint8_t) is expanded to signed representation (int8_t) where each bit becomes ±1
Centroid Quantization: After computing float centroids in expanded space, they are converted back to binary format:
3. Distance Kernels
Coarse Search (Cluster Selection)
bitwise_hamming_distance_opfor query-to-centroid distances in order to computePairwiseDistancesFine-Grained Search (Within Clusters)
Extended the interleaved scan kernel (
ivf_flat_interleaved_scan.cuh) with specialized templates for BitwiseHamming:Veclen-based optimization: Different code paths based on vectorization width
uint32_t, use__popc(x ^ y)for 4-byte Hamming distanceEfficient memory access patterns:
loadAndComputeDisttemplates foruint8_tthat leverage vectorized loadscuvs-bench Benchmarks (latency):



