Query Processing on Tensor Computation Runtimes
University of Washington
arXiv:2203.01877 [cs.DB], (3 Mar 2022)
@article{he2022query,
title={Query Processing on Tensor Computation Runtimes},
author={He, Dong and Nakandala, Supun and Banda, Dalitso and Sen, Rathijit and Saur, Karla and Park, Kwanghyun and Curino, Carlo and Camacho-Rodríguez, Jesús and Karanasos, Konstantinos and Interlandi, Matteo},
year={2022}
}
The huge demand for computation in artificial intelligence (AI) is driving unparalleled investments in new hardware and software systems for AI. This leads to an explosion in the number of specialized hardware devices, which are now part of the offerings of major cloud providers. Meanwhile, by hiding the low-level complexity through a tensor-based interface, tensor computation runtimes (TCRs) such as PyTorch allow data scientists to efficiently exploit the exciting capabilities offered by the new hardware. In this paper, we explore how databases can ride the wave of innovation happening in the AI space. Specifically, we present Tensor Query Processor (TQP): a SQL query processor leveraging the tensor interface of TCRs. TQP is able to efficiently run the full TPC-H benchmark by implementing novel algorithms for executing relational operators on the specialized tensor routines provided by TCRs. Meanwhile, TQP can target various hardware while only requiring a fraction of the usual development effort. Experiments show that TQP can improve query execution time by up to 20x over CPU-only systems, and up to 5x over specialized GPU solutions. Finally, TQP can accelerate queries mixing ML predictions and SQL end-to-end, and deliver up to 5x speedup over CPU baselines.
March 6, 2022 by hgpu