TPU-KNN: K Nearest Neighbor Search at Peak FLOP/s

Felix Chern, Blake Hechtman, Andy Davis, Ruiqi Guo, David Majnemer, Sanjiv Kumar
2022
3 references

Abstract

This paper presents a novel nearest neighbor search algorithm achieving TPU (Google Tensor Processing Unit) peak performance, outperforming state-of-the-art GPU algorithms with similar level of recall. The design of the proposed algorithm is motivated by an accurate accelerator performance model that takes into account both the memory and instruction bottlenecks. Our algorithm comes with an analytical guarantee of recall in expectation and does not require maintaining sophisticated index data structure or tuning, making it suitable for applications with frequent updates. Our work is available in the open-source package of Jax and Tensorflow on TPU.

1 repository
3 references

Code References

tensorflow/tensorflow
2 files
tensorflow/go/op/wrappers.go
1
L1133 // See https://arxiv.org/abs/2206.14286 for the algorithm details.
tensorflow/python/ops/nn_ops.py
2
L5898 See https://arxiv.org/abs/2206.14286 for the algorithm details. This op is
L5961 See https://arxiv.org/abs/2206.14286 for the algorithm details. This op is
Link copied to clipboard!