The huge demand for computation in artificial intelligence (AI) is driving unparalleled investments in hardware and software systems for AI. This leads to an explosion in the number of specialized hardware devices, which are now offered by major cloud vendors. 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 database management systems can ride the wave of innovation happening in the AI space. We design, build, and evaluate Tensor Query Processor (TQP): TQP transforms SQL queries into tensor programs and executes them on TCRs. TQP is able to run the full TPC-H benchmark by implementing novel algorithms for relational operators on the tensor routines. At the same time, TQP can support various hardware while only requiring a fraction of the usual development effort. Experiments show that TQP can improve query execution time by up to 10$\times$ over specialized CPU- and GPU-only systems. Finally, TQP can accelerate queries mixing ML predictions and SQL end-to-end, and deliver up to 9$\times$ speedup over CPU baselines.
翻译:人工智能(AI)的计算需求巨大,导致对AI的硬件和软件系统进行前所未有的投资。这导致专门硬件设备的数量激增,目前由主要云级供应商提供。通过基于高压的界面隐藏低层次的复杂性,高调计算运行时间(TCR),例如PyTorrch使数据科学家能够有效地利用新硬件提供的令人兴奋的能力。在本文中,我们探索数据库管理系统如何能够驾驭AI空间的创新浪潮。我们设计、建设和评价Tensor Query 处理器(TQP):TQP将SQL查询转换为高压程序,并在TRCR中执行。TQP能够通过在高压程序上为关系操作者实施新的算法来运行全TPC-H基准。同时,TQP可以支持各种硬件,而只是通常的开发努力的一小部分。实验显示,TQP可以将查询执行时间提高到超过专门CPU和GPU-end-stal 系统10美元。最后,TQQ可以加速到SPU-timing SU-timal 和S-tal-riewal-L 查询。