Sparse tensor algebra is challenging to efficiently parallelize due to the irregular, data-dependent, and potentially skewed structure of sparse computation. We propose the first partitioning algorithm that provably load balances the computation of any sparse tensor algebra expression across parallel execution units. Our algorithm generalizes parallel merging algorithms to any number of operands, and to multi-dimensional, hierarchical sparse data structures. We implement our algorithm within an existing sparse tensor algebra compilation framework to automatically generate parallel sparse tensor algebra kernels that target multi-core CPUs and GPUs. We show that our generated code is competitive with hand-implemented parallelization strategies used by vendor libraries like Intel MKL and NVIDIA cuSPARSE (geo-means of $0.73$--$3.4\times$) and \textsc{Taco} (geo-means of $1.0$--$2.4\times$), and significantly outperforms general-purpose strategies for sparse tensor expressions where specialized algorithms have not been developed (geo-means of $2.0$--$6.4\times$).


翻译:稀疏张量代数由于计算的不规则性、数据依赖性和潜在偏斜结构,难以高效并行化。我们提出首个分区算法,能在理论上保证任意稀疏张量代数表达式在并行执行单元上的负载均衡。该算法将并行归并算法推广至任意数量操作数,并支持多维层次化稀疏数据结构。我们在现有稀疏张量代数编译框架中实现该算法,自动生成面向多核CPU和GPU的并行稀疏张量代数核。实验表明,我们生成的代码与Intel MKL和NVIDIA cuSPARSE等供应商库的手工优化并行策略(几何均值$0.73$--$3.4\times$)及\textsc{Taco}(几何均值$1.0$--$2.4\times$)性能相当,且在尚未开发专用算法的稀疏张量表达式上显著优于通用策略(几何均值$2.0$--$6.4\times$)。

0
下载
关闭预览

相关内容

【博士论文】利用图结构加速稀疏计算
专知会员服务
18+阅读 · 2025年3月6日
专知会员服务
46+阅读 · 2020年7月29日
【硬核书】可扩展机器学习:并行分布式方法
专知会员服务
87+阅读 · 2020年5月23日
非平衡数据集 focal loss 多类分类
AI研习社
33+阅读 · 2019年4月23日
稀疏性的3个优势 -《稀疏统计学习及其应用》
遇见数学
15+阅读 · 2018年10月24日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
最新内容
《最强大的军事网状网络》
专知会员服务
1+阅读 · 今天14:29
《预测陆军征兵任务分配》110页
专知会员服务
1+阅读 · 今天14:21
分层反无人机系统发展新趋势
专知会员服务
10+阅读 · 9月3日
何为协作武器?
专知会员服务
10+阅读 · 9月1日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员