RTop-K: Ultra-Fast Row-Wise Top-K Algorithm and GPU Implementation for Neural Networks
<|reference_start|>RTop-K: Ultra-Fast Row-Wise Top-K Algorithm and GPU Implementation for Neural Networks: Top-k algorithms are essential in various applications, from high-performance computing and information retrieval to big data and neural network model training. This paper introduces RTop-K, a highly efficient parallel row-wise top-k selection algorithm designed for GPUs. RTop-K employs a Binary Search-based approach to optimize resource allocation and provides a scalable solution that significantly accelerates top-k operations. We perform a theoretical analysis of the effects of early stopping in our algorithm, demonstrating that it maintains the accuracy of neural network models while enhancing performance. Comprehensive tests show that our GPU implementation of RTop-K outperforms other row-wise top-k GPU implementations, with minimal impact on testing accuracy when early stopping is applied. Notably, RTop-K achieves speed increases ranging from 4.245$\times$ to 9.506$\times$ with early stopping, and 3.936$\times$ without early stopping, compared to state-of-the-art implementations. The proposed methods offer significant improvements in the training and inference of Graph Neural Networks (GNNs), addressing critical challenges in latency and throughput on GPU platforms.<|reference_end|>
@article{xie2024rtop-k:,
    title={RTop-K: Ultra-Fast Row-Wise Top-K Algorithm and GPU Implementation for
  Neural Networks},
    author={Xi Xie, Yuebo Luo, Hongwu Peng, and Caiwen Ding},
    journal={arXiv preprint arXiv:2409.00822},
    year={2024},
    archivePrefix={arXiv},
    eprint={2409.00822},
    primaryClass={cs.DC}
}