arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.08230cs.MScs.DCcs.PFcs.SE
收藏

pyGinkgo:用于Python的稀疏线性代数算子框架

pyGinkgo: A Sparse Linear Algebra Operator Framework for Python

Karlsruhe Institute of Technology(卡尔斯鲁厄理工学院);Technical University of Munich(慕尼黑工业大学);University of Tennessee(田纳西大学)

Keshvi Tuteja, Gregor Olenik, Roman Mishchuk, Yu-Hsiang Tsai, Markus Götz, Achim Streit, Hartwig Anzt, Charlotte Debus

AI总结:

本文提出pyGinkgo,一个基于Ginkgo的Python稀疏线性代数框架,通过Pybind11提供跨CUDA、HIP和OpenMP的高性能稀疏矩阵运算,在SpMV和迭代求解器上优于SciPy等现有Python库,并与原生C++性能相当。

摘要:

稀疏线性代数是许多科学计算和机器学习应用的基石。Python因其简单易用而成为这些应用的热门选择。然而,Python中的高性能稀疏内核在功能上仍然有限,尤其是在现代CPU和GPU架构上。我们提出了pyGinkgo,一个轻量级且符合Python风格的Ginkgo库接口,提供高性能的稀疏线性代数支持,并具备跨CUDA、HIP和OpenMP后端平台的可移植性。pyGinkgo通过Pybind11以及兼容NumPy和PyTorch的接口暴露Ginkgo的功能,弥合了高性能C++后端与Python易用性之间的差距。我们将pyGinkgo的性能与包括SciPy、CuPy、PyTorch和TensorFlow在内的最先进的Python库进行了基准测试。来自不同厂商硬件的测试结果表明,pyGinkgo在稀疏矩阵向量乘(SpMV)和迭代求解器性能方面始终优于现有的Python工具,同时与原生Ginkgo C++代码保持性能相当。我们的工作将pyGinkgo定位为稀疏机器学习模型和科学工作流的引人注目的后端。

英文摘要:

Sparse linear algebra is a cornerstone of many scientific computing and machine learning applications. Python has become a popular choice for these applications due to its simplicity and ease of use. Yet high performance sparse kernels in Python remain limited in functionality, especially on modern CPU and GPU architectures. We present pyGinkgo, a lightweight and Pythonic interface to the Ginkgo library, offering high-performance sparse linear algebra support with platform portability across CUDA, HIP, and OpenMP backends. pyGinkgo bridges the gap between high-performance C++ backends and Python usability by exposing Ginkgo's capabilities via Pybind11 and a NumPy and PyTorch compatible interface. We benchmark pyGinkgo's performance against state-of-the-art Python libraries including SciPy, CuPy, PyTorch, and TensorFlow. Results across hardware from different vendors demonstrate that pyGinkgo consistently outperforms existing Python tools in both sparse matrix vector (SpMV) product and iterative solver performance, while maintaining performance parity with native Ginkgo C++ code. Our work positions pyGinkgo as a compelling backend for sparse machine learning models and scientific workflows.

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

↑