Owing to the diverse scales and varying distributions of sparse matrices arising from practical problems, a multitude of choices are present in the design and implementation of sparse matrix-vector multiplication (SpMV). Researchers have proposed many machine learning-based optimization methods for SpMV. However, these efforts only support one area of sparse matrix format selection, SpMV algorithm selection, or parameter configuration, and rarely consider a large amount of time overhead associated with feature extraction, model inference, and compression format conversion. This paper introduces a machine learning-based cascaded prediction method for SpMV computations that spans various computing stages and hierarchies. Besides, an asynchronous and concurrent computing model has been designed and implemented for runtime model prediction and iterative algorithm solving on heterogeneous computing platforms. It not only offers comprehensive support for the iterative algorithm-solving process leveraging machine learning technology, but also effectively mitigates the preprocessing overheads. Experimental results demonstrate that the cascaded prediction introduced in this paper accelerates SpMV by 1.33x on average, and the iterative algorithm, enhanced by cascaded prediction and asynchronous execution, optimizes by 2.55x on average.
翻译:由于实际问题产生的稀疏矩阵具有多样化的规模和分布特性,稀疏矩阵-向量乘法(SpMV)的设计与实现存在多重选择。研究人员已提出多种基于机器学习的SpMV优化方法。然而,这些工作仅支持稀疏矩阵格式选择、SpMV算法选择或参数配置中的单一环节,且很少考虑特征提取、模型推断和压缩格式转换所伴随的大量时间开销。本文提出一种基于机器学习的级联预测方法,用于跨越不同计算阶段与层级的SpMV计算。此外,本文设计并实现了异步并发计算模型,用于异构计算平台上的运行时模型预测与迭代算法求解。该方法不仅为利用机器学习技术的迭代算法求解过程提供全面支持,还能有效降低预处理开销。实验结果表明,本文提出的级联预测方法使SpMV平均加速1.33倍,而通过级联预测与异步执行增强的迭代算法平均优化2.55倍。