The GEneral Matrix Multiplication (GEMM) is one of the essential algorithms in scientific computing. Single-thread GEMM implementations are well-optimised with techniques like blocking and autotuning. However, due to the complexity of modern multi-core shared memory systems, it is challenging to determine the number of threads that minimises the multi-thread GEMM runtime. We present a proof-of-concept approach to building an Architecture and Data-Structure Aware Linear Algebra (ADSALA) software library that uses machine learning to optimise the runtime performance of BLAS routines. More specifically, our method uses a machine learning model on-the-fly to automatically select the optimal number of threads for a given GEMM task based on the collected training data. Test results on two different HPC node architectures, one based on a two-socket Intel Cascade Lake and the other on a two-socket AMD Zen 3, revealed a 25 to 40 per cent speedup compared to traditional GEMM implementations in BLAS when using GEMM of memory usage within 100 MB.


翻译:通用矩阵乘法(GEMM)是科学计算中的核心算法之一。单线程GEMM实现已通过分块和自动调优等技术得到充分优化。然而,由于现代多核共享内存系统的复杂性,确定能够最小化多线程GEMM运行时间的线程数仍具挑战性。本文提出一种概念验证方法,用于构建架构与数据结构感知的线性代数(ADSALA)软件库,该库利用机器学习优化基础线性代数子程序(BLAS)的运行性能。具体而言,我们的方法通过在线机器学习模型,基于已收集的训练数据为给定GEMM任务自动选择最优线程数。在两种不同的高性能计算节点架构(一种基于双路Intel Cascade Lake,另一种基于双路AMD Zen 3)上的测试结果表明,当内存使用量在100 MB以内时,相较于传统BLAS中的GEMM实现,本方法可获得25%至40%的加速比。

0
下载
关闭预览

相关内容

专知会员服务
148+阅读 · 2021年8月12日
专知会员服务
50+阅读 · 2021年8月4日
专知会员服务
75+阅读 · 2020年12月7日
机器学习中的最优化算法总结
人工智能前沿讲习班
22+阅读 · 2019年3月22日
【干货】理解深度学习中的矩阵运算
专知
12+阅读 · 2018年2月12日
最新|深度离散哈希算法,可用于图像检索!
全球人工智能
14+阅读 · 2017年12月15日
干货|掌握机器学习数学基础之优化[1](重点知识)
机器学习研究会
10+阅读 · 2017年11月19日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
从浅层模型到深度模型:概览机器学习优化算法
机器之心
27+阅读 · 2017年7月9日
国家自然科学基金
8+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
8+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员