arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.05159cs.LGcs.MScs.NAmath.NA
收藏

面向反向模式自动微分的优化稀疏矩阵运算

Optimized Sparse Matrix Operations for Reverse Mode Automatic Differentiation

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);NVIDIA Corporation(英伟达公司);Memorial University of Newfoundland(纽芬兰纪念大学)

Nicolas Nytko, Ali Taghibakhshi, Tareq Uz Zaman, Scott MacLachlan, Luke N. Olson, Matt West

AI总结:

本研究为PyTorch实现了基于CSR的稀疏矩阵封装,支持CUDA加速和自动微分,并在优化问题中展示了其性能优势。

摘要:

稀疏矩阵表示在计算科学和机器学习中无处不在,对于具有局部连接性的问题,与稠密表示相比,它能显著减少计算时间。然而,领先的机器学习框架(如PyTorch)对稀疏表示的支持并不完整,缺少对自动微分和GPU加速的支持。在本工作中,我们提出了一种基于CSR的PyTorch稀疏矩阵封装实现,该实现具备基本矩阵运算的CUDA加速以及自动可微性。我们还展示了所得到的稀疏内核在优化问题中的若干应用,证明了实现的简便性,并与其稠密对应物进行了性能测量对比。

英文摘要:

Sparse matrix representations are ubiquitous in computational science and machine learning, leading to significant reductions in compute time, in comparison to dense representation, for problems that have local connectivity. The adoption of sparse representation in leading ML frameworks such as PyTorch is incomplete, however, with support for both automatic differentiation and GPU acceleration missing. In this work, we present an implementation of a CSR-based sparse matrix wrapper for PyTorch with CUDA acceleration for basic matrix operations, as well as automatic differentiability. We also present several applications of the resulting sparse kernels to optimization problems, demonstrating ease of implementation and performance measurements versus their dense counterparts.

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

↑