arXiv:2608.05033cs.DCcs.LG2026-08

用大模型自动优化稀疏矩阵计算内核,适配不同数据模式和显卡。

SparseDitto: Customizing GPU Kernels for Different Sparsity Patterns with LLM-Based Agentic System

论文配图:SparseDitto: Customizing GPU Kernels for Different Sparsity Patterns with LLM-Based Agentic System
图 1 · 摘自论文原文
  • 基于大模型生成针对每种稀疏模式的定制化GPU内核。
  • 在RTX PRO 6000上平均提速2.68倍,最高达146.61倍。
  • 适合需要极致性能的科学计算与图神经网络训练场景。

稀疏矩阵内核是科学计算、图分析和机器学习的核心。其在GPU上的性能高度依赖输入稀疏模式与执行策略。同一SpMM操作在相同矩阵上,cuSPARSE在CSR与Blocked-ELL格式间性能差距高达350倍。我们对多种数据格式、专用系统与稀疏编译器的研究表明,无单一实现能在所有稀疏模式与算子上持续领先。这推动了需根据工作负载与目标GPU动态调整表示、执行策略与硬件映射的系统设计。本文提出SparseDitto,一个基于大模型的系统,可为每个矩阵、算子与目标GPU生成专属GPU内核。SparseDitto统一支持SpMV、SpMM与SpGEMM。轻量级加性模型利用输入矩阵的结构特征对已有策略排序;架构感知规划器生成多个候选设计;编码与验证代理在目标GPU上测量并迭代优化实现。在三个稀疏算子与多样化矩阵上,SparseDitto在NVIDIA RTX PRO 6000上相较cuSPARSE实现几何均值2.68倍加速,峰值达146.61倍;在H200上实现2.79倍,峰值78.5倍。其生成的SpMM内核还可将全批量GCN训练速度提升至多3.39倍。

原文摘要 · Abstract (English)

Sparse matrix kernels are fundamental to scientific computing, graph analytics, and machine learning. Their GPU performance depends strongly on the input sparsity pattern and execution strategy. For the same SpMM on the same matrix, cuSPARSE exhibits a 350x performance gap between CSR and Blocked-ELL. Our study of multiple data formats, specialized systems, and sparse compilers shows that no single implementation consistently dominates across sparsity patterns and operators. This motivates a system that can adapt its representation, execution strategy, and hardware mapping to each workload and target GPU. We present SparseDitto, an LLM-based system that constructs a GPU kernel for each matrix, operator, and target GPU. SparseDitto supports SpMV, SpMM, and SpGEMM within a unified design framework. A lightweight additive model ranks established strategies using structural features of the input matrix. An architecture-aware planner then proposes several candidate designs. Coding and verification agents implement and refine them using measurements from the target GPU. Across three sparse operators and a diverse set of matrices, SparseDitto achieves a geometric-mean speedup of 2.68x over cuSPARSE on an NVIDIA RTX PRO 6000 GPU, with a maximum of 146.61x. On an NVIDIA H200 GPU, it achieves 2.79x, with a maximum of 78.5x. Its generated SpMM kernels also accelerate full-batch GCN training by up to 3.39x.

稀疏计算大模型应用GPU优化图神经网络

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。