新一代自适应库的模型驱动方法
A model-driven approach for a new generation of adaptive libraries
摘要:
高效的高性能库通常公开多个可调参数,以提供高度优化的例程。这些范围可以从简单的循环展开因子或向量大小一直到算法变化,假定某些实现可以通过利用诸如本地存储器和向量单元之类的硬件特性而更适合于某些设备。传统上,这样的参数和算法选择被调整,然后针对特定架构和输入的某些特性进行硬编码。然而,新兴的应用程序通常是数据驱动的,因此传统的方法在实践中使用的广泛的输入和架构中并不有效。在本文中,我们提出了一种新的自适应框架,用于数据驱动的应用程序,它使用预测模型来选择最佳的算法参数,通过训练合成和真实的数据集。我们证明了BLAS库的有效性,特别是在其矩阵乘法例程。我们目前的实验结果为两个GPU架构,并显示显着的性能增益高达3倍(高端NVIDIA Pascal GPU)和2.5倍(嵌入式ARM马里GPU)相比,传统的优化库。
英文摘要:
Efficient high-performance libraries often expose multiple tunable parameters to provide highly optimized routines. These can range from simple loop unroll factors or vector sizes all the way to algorithmic changes, given that some implementations can be more suitable for certain devices by exploiting hardware characteristics such as local memories and vector units. Traditionally, such parameters and algorithmic choices are tuned and then hard-coded for a specific architecture and for certain characteristics of the inputs. However, emerging applications are often data-driven, thus traditional approaches are not effective across the wide range of inputs and architectures used in practice. In this paper, we present a new adaptive framework for data-driven applications which uses a predictive model to select the optimal algorithmic parameters by training with synthetic and real datasets. We demonstrate the effectiveness of a BLAS library and specifically on its matrix multiplication routine. We present experimental results for two GPU architectures and show significant performance gains of up to 3x (on a high-end NVIDIA Pascal GPU) and 2.5x (on an embedded ARM Mali GPU) when compared to a traditionally optimized library.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。