Existing 3D algorithms for distributed-memory sparse kernels suffer from limited scalability due to reliance on bulk sparsity-agnostic communication. While easier to use, sparsity-agnostic communication leads to unnecessary bandwidth and memory consumption. We present SpComm3D, a framework for enabling sparsity-aware communication and minimal memory footprint such that no unnecessary data is communicated or stored in memory. SpComm3D performs sparse communication efficiently with minimal or no communication buffers to further reduce memory consumption. SpComm3D detaches the local computation at each processor from the communication, allowing flexibility in choosing the best accelerated version for computation. We build 3D algorithms with SpComm3D for the two important sparse ML kernels: Sampled Dense-Dense Matrix Multiplication (SDDMM) and Sparse matrix-matrix multiplication (SpMM). Experimental evaluations on up to 1800 processors demonstrate that SpComm3D has superior scalability and outperforms state-of-the-art sparsity-agnostic methods with up to 20x improvement in terms of communication, memory, and runtime of SDDMM and SpMM. The code is available at: https://github.com/nfabubaker/SpComm3D
Performance Modeling of Streaming Kernels and Sparse Matrix-Vector Multiplication on A64FX
A64 FX CPU是目前Top500排行榜上排名第一的超级计算机。虽然它是一个传统的基于缓存的多核处理器,但其峰值性能和内存带宽可与加速器设备相媲美。为这样一个新的体系结构生成高效的代码需要很好地理解其性能特性。利用这些功能,我们构建的执行缓存存储器(ECM)的性能模型的A64 FX处理器在FX 700超级计算机,并验证它使用流循环。我们还确定架构的特点,并获得优化提示。将ECM模型应用于稀疏矩阵向量乘法(SpMV),我们激发了CRS矩阵存储格式不合适的原因以及SELL-C-sigma格式如何通过适当的代码优化实现SpMV的带宽饱和。
Adaptive SpMV/SpMSpV on GPUs for Input Vectors of Varied Sparsity
尽管在现代硬件架构上进行了大量的工作来优化稀疏矩阵和向量乘法(SpMV)的性能,但很少对其稀疏对应物稀疏矩阵和稀疏向量乘法(SpMSpV)进行工作,更不用说处理不同稀疏度的输入向量了。关键的挑战是,根据稀疏性级别、数据分布和计算平台,SpMV/SpMSpV内核的最佳选择可能会有所不同,静态选择是不够的。在本文中,我们提出了一个自适应的SpMV/SpMSpV框架,它可以自动选择合适的SpMV/SpMSpV内核的GPU上的任何稀疏矩阵和向量在运行时。在系统分析计算模式、负载分配和回写策略等关键因素的基础上,将8个候选SpMV/SpMSpV内核封装到框架中,实现了高性能的无缝集成。从精度和开销两个方面对基于机器学习的核选择器进行了全面的研究,以选择核并适应输入和硬件的变化。实验表明,自适应框架在NVIDIA Tesla K40 m、P100和V100 GPU上的实际应用中的性能大大超过了之前的最先进水平。