检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:王震[1] 聂凯 韩林 WANG Zhen;NIE Kai;HAN Lin(School of Computer and Artificial Intelligence,Zhengzhou University,Zhengzhou 450000,China;National Supercomputing Center in Zhengzhou,Zhengzhou University,Zhengzhou 450000,China)
机构地区:[1]郑州大学计算机与人工智能学院,郑州450000 [2]郑州大学国家超级计算郑州中心,郑州450000
出 处:《计算机科学》2024年第4期78-85,共8页Computer Science
基 金:2022年河南省重大科技专项(221100210600);22求是科研启动(自)(32213247)。
摘 要:自动向量化代价模型是编译器进行自动向量化优化时的重要组成部分,其作用是评估代码在应用向量化转换后能否获得性能提升。当代价模型不准确时,编译器会应用负收益的向量化转换,从而降低程序的执行效率。针对GCC编译器默认代价模型的不精确问题,以Intel Xeon Silver 4214R CPU为平台,提出了一种基于指令MKS的自动向量化代价模型。该模型充分考虑了指令的机器模式、运算类型以及运算强度等,并使用梯度下降算法自动搜索不同指令类型的近似代价。在SPEC2006以及SPEC2017上进行了单线程测试,实验结果表明,该模型能够减少收益评估错误的情况。与默认代价模型生成的向量程序相比,GCC编译器添加MKS代价模型后,在SPEC2006课题上最高获得了4.72%的提速,在SPEC2017课题上最高获得了7.08%的提速。The auto-vectorization cost model is an important component of compiler’s auto-vectorization optimization.Its role is to evaluate whether the code can achieve performance improvement after applying vectorization transformation.When the cost model is inaccurate,the compiler will apply vectorization transformation with negative benefit,thus reducing the execution efficiency of the program.Aiming at the inaccuracy of the default cost model of GCC compiler,based on Intel Xeon Silver 4214R CPU,an auto-vectorization cost model based on instruction MKS is proposed.The model fully considers the machine mode,operation type and operation intensity of instructions,and uses gradient descent algorithm to automatically search the approximate cost of different instruction types.Single-thread tests are carried out on SPEC2006 and SPEC2017.Experimental results show that the model can reduce the error of benefit estimation.Compared with the vector program generated by the default cost model,the GCC compiler,after adding the MKS cost model,achieves a maximum speedup of 4.72%on the SPEC2006 benchmark and 7.08%on the SPEC2017 benchmark.
关 键 词:GCC编译器 自动向量化 代价模型 收益评估 梯度下降
分 类 号:TP314[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:52.14.93.7