arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2006.16767cs.DCcs.MS
收藏

基于GPU的可变稀疏度输入向量自适应SpMV/SpMSpV

Adaptive SpMV/SpMSpV on GPUs for Input Vectors of Varied Sparsity

Min Li, Yulong Ao, Chao Yang

摘要:

尽管在现代硬件架构上进行了大量的工作来优化稀疏矩阵和向量乘法(SpMV)的性能,但很少对其稀疏对应物稀疏矩阵和稀疏向量乘法(SpMSpV)进行工作,更不用说处理不同稀疏度的输入向量了。关键的挑战是,根据稀疏性级别、数据分布和计算平台,SpMV/SpMSpV内核的最佳选择可能会有所不同,静态选择是不够的。在本文中,我们提出了一个自适应的SpMV/SpMSpV框架,它可以自动选择合适的SpMV/SpMSpV内核的GPU上的任何稀疏矩阵和向量在运行时。在系统分析计算模式、负载分配和回写策略等关键因素的基础上,将8个候选SpMV/SpMSpV内核封装到框架中,实现了高性能的无缝集成。从精度和开销两个方面对基于机器学习的核选择器进行了全面的研究,以选择核并适应输入和硬件的变化。实验表明,自适应框架在NVIDIA Tesla K40 m、P100和V100 GPU上的实际应用中的性能大大超过了之前的最先进水平。

英文摘要:

Despite numerous efforts for optimizing the performance of Sparse Matrix and Vector Multiplication (SpMV) on modern hardware architectures, few works are done to its sparse counterpart, Sparse Matrix and Sparse Vector Multiplication (SpMSpV), not to mention dealing with input vectors of varied sparsity. The key challenge is that depending on the sparsity levels, distribution of data, and compute platform, the optimal choice of SpMV/SpMSpV kernel can vary, and a static choice does not suffice. In this paper, we propose an adaptive SpMV/SpMSpV framework, which can automatically select the appropriate SpMV/SpMSpV kernel on GPUs for any sparse matrix and vector at the runtime. Based on systematic analysis on key factors such as computing pattern, workload distribution and write-back strategy, eight candidate SpMV/SpMSpV kernels are encapsulated into the framework to achieve high performance in a seamless manner. A comprehensive study on machine learning based kernel selector is performed to choose the kernel and adapt with the varieties of both the input and hardware from both accuracy and overhead perspectives. Experiments demonstrate that the adaptive framework can substantially outperform the previous state-of-the-art in real-world applications on NVIDIA Tesla K40m, P100 and V100 GPUs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑