首页 | 本学科首页   官方微博 | 高级检索  
     

一种基于遗传算法的BLAS库优化方法
引用本文:孙成国,兰静,姜浩.一种基于遗传算法的BLAS库优化方法[J].计算机工程与科学,2018,40(5):798-804.
作者姓名:孙成国  兰静  姜浩
作者单位:(1.国防科技大学计算机学院,湖南 长沙 410073;2.重庆工商大学融智学院,重庆 404100)
基金项目:国家863项目(2012AA01A301);国家自然科学基金(61402495,61303189,61602166,61170049,61402496);重庆市教育科学规划课题重点项目(2015-GX-036)
摘    要:基于OpenBLAS和BLIS开源线性代数基础算法库,对稠密矩阵乘法GEMM运算的性能优化展开研究。针对如何选取稠密矩阵分块并行算法的关键分块参数这一问题,建立性能优化模型。采用改进的遗传算法求解上述优化模型,将某一分块参数组合(种群个体)所对应的稠密矩阵乘法的性能值作为该个体的适应度,通过不断迭代地进行选择、交叉、变异操作,找到最优的分块参数组合,使得稠密矩阵运算的性能值最优。数值实验表明,基于遗传算法求解得出最优分块参数下的GEMM性能值优于默认分块参数下的性能值,达到了优化的目的。

关 键 词:BLAS  GEMM  遗传算法  自动调优  
收稿时间:2017-11-23
修稿时间:2018-05-25

A BLAS library optimization method based on genetic algorithm
SUN Cheng-guo,LAN Jing,JIANG Hao.A BLAS library optimization method based on genetic algorithm[J].Computer Engineering & Science,2018,40(5):798-804.
Authors:SUN Cheng-guo  LAN Jing  JIANG Hao
Affiliation:(1.College of Computer,National University of Defense Technology,Changsha 410073; 2.Rongzhi College,Chongqing Technology and Business University,Chongqing 404100,China)
Abstract:Based on OpenBLAS and BLIS, the two open source linear algebra libraries, the performance optimization of dense matrix multiplication (GEMM) operation is studied. Aiming at how to select the key block parameters of GEMM, a performance optimization model is established. An improved genetic algorithm is used to solve the above performance optimization model. The performance value of the GEMM corresponding to a certain parameter combination (individual) is taken as the fitness of the individual. The optimal combination of block parameters is found through continuous iterative selection, crossover and mutation operations in order to make the performance of GEMM optimal. Numerical experiments show that the performance of GEMM based on genetic algorithm is better than the performance under the initial block parameters, and hence the optimization is achieved.
Keywords:BLAS  GEMM  genetic algorithm  autotuning  
点击此处可从《计算机工程与科学》浏览原始摘要信息
点击此处可从《计算机工程与科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号