Computer Science ›› 2025, Vol. 52 ›› Issue (7): 248-254.doi: 10.11896/jsjkx.241000181

• Artificial Intelligence • Previous Articles     Next Articles

Research on Automatic Vectorization Benefit Evaluation Model Based on Particle SwarmAlgorithm

LIU Mengzhen1, ZHOU Qinglei1, HAN Lin2, NIE Kai2, LI Haoran2, CHEN Mengyao1, LIU Haohao2   

  1. 1 School of Computer Science and Artificial Intelligence, Zhengzhou University, Zhengzhou 450001, China
    2 National Supercomputing Center in Zhengzhou, Zhengzhou University, Zhengzhou 450001, China
  • Received:2024-10-31 Revised:2025-02-12 Published:2025-07-17
  • About author:LIU Mengzhen,born in 2000,postgra-duate.Her main research interests include compiler optimization and high-performance computing.
    NIE Kai,born in 1987,Ph.D,senior engineer,graduate advisor.His main research interests include advanced compilation techniques,high-performance computing and so on.
  • Supported by:
    2024 Henan Provincial Major Science and Technology Project(241100210100),2024 Henan Provincial Science and Technology Research Project(242102211094),2023 National Key R&D Program for High-Performance Computing(2023YFB3002505) and 2022 Henan Provincial Major Science and Technology Project(221100210600).

Abstract: Automatic vectorization leverages SIMD components to accelerate program execution,easing the programmers' workload and serving as a key optimization in the GCC compiler.However,the current benefit evaluation model in GCC lacks precision,affecting vectorization decisions.To improve vectorization efficiency on the Sunway platform,this study introduces a new benefit evaluation model within GCC.The model designs cost metrics specific to the Sunway processor's backend instruction set and applies a particle swarm algorithm to optimize these costs,enhancing evaluation accuracy and vectorization performance.Experimental results on SPEC2006 and SPEC2017 benchmarks show that the proposed model delivers up to 7.6% and 5.75% performance gains,respectively,over the default GCC model.These outcomes confirm the model's effectiveness in refining automatic vectorization and improving the usability of the Sunway compilation system.With more accurate evaluations,the model supports better optimization decisions,resulting in enhanced platform performance.

Key words: Sunway, GCC compiler, Auto-vectorization, Cost model, Particle swarm optimization

CLC Number: 

  • TP314
[1]AMIRIH,SHAHBAHRAMI A,POHL A,et al.Performance Evaluation of Implicit and Explicit SIMDization[J].Microprocessors and Microsystems,2018,63:158-168.
[2]FENG J G,HE Y P,TAO Q M.Automatic Vectorization:Recent Advances and Future Perspectives[J].Journal of Communications,2022,43(3):180-195.
[3]GAO W,ZHAO R C,HAN L,et al.Overview of SIMD Automatic Vectorization Compiler Optimization[J].Journal of Software,2015,26(6):1265-1284.
[4]LI W.Research on Automatic Vectorization Optimization Method Based on Improved VEGEN[D].Harbin:Harbin Engineering University,2022.
[5]CHEN M Y.Research on Loop Distribution Techniques for the Sunway GCC Compilation System[D].Zhengzhou:Zhengzhou University,2021.
[6]ASHOURIA H,KILLIAN W,CAVAZOS J,et al.A survey on compiler autotuning using machine learning[J].ACM Computing Surveys,2018,51(5):1-42.
[7]TANGY,WANG C.Performance modeling on DaVinci AI core[J].Journal of Parallel and Distributed Computing,2023,175:134-149.
[8]LEATHERH,CUMMINS C.Machine learning in compilers:Past,present and future[C]//2020 Forum for Specification and Design Languages(FDL).New York:IEEE,2020:1-8.
[9]STOCKK,POUCHET L N,SADAYAPPAN P.Using machine learning to improve automatic vectorization[J].ACM Transactions on Architecture and Code Optimization,2012,8(4):1-23.
[10]POHLA,COSENZA B,JUURLINK B.Vectorization cost mo-deling for NEON,AVX and SVE[J].Performance Evaluation,2020,140:102106.
[11]WANG Z,NIE K,HAN L.An Automatic Vectorization CostModel Based on Instruction MKS[J].Computer Science,2024,51(4):78-85.
[12]TRIFUNOVIC K,NUZMAN D,COHEN A,et al.Polyhedral-model guided loop-nest auto-vectorization[C]//Proceedings of 2009 18th International Conference on Parallel Architectures and Compilation Techniques.IEEE,2009:327-337.
[13]ZHANG Y Y,ZHAO R C,HAN L.A Vectorization Benefit Evaluation Method Based on Polyhedral Representation[J].Computer Engineering,2012,38(7):266-268,272.
[14]LI C J,XU Y,DONG Y S.Research on Automatic Vectorization Cost Model for Multi-core Multi-SIMD Architectures[C]//Proceedings of the 18th Annual Conference on Computer Engineering and Technology and the 4th Microprocessor Technology Forum.2014:111-116.
[15]LI J N.LLVM Automatic Vectorization Porting and Optimization for the Sunway Platform[D].Zhengzhou:Zhengzhou University,2021.
[16]HAN Y,YU M.A Review of the Application of Particle Swarm Optimization in Robot Path Planning[J].Manufacturing Technology & Machine Tools,2024(7):85-90.
[17]DORIT N,IRA R,AYAL Z.Auto-vectorization of interleaved data for SIMD[J].Association for Computing Machinery,2006,6:132-143.
[18]TAN H,CHEN H,SHENG L,et al.Modeling and evaluation for gather/scatter operations in VectorSIMD architectures[C]//2017 IEEE 28th International Conference on Application-specific Systems,Architectures and Processors(ASAP).New York:IEEE,2017.
[19]LI J N,HAN L,CHAI Y D.LLVM Automatic VectorizationPorting and Optimization for Domestic Platforms[J].Computer Engineering,2022,48(1):142-148.
[20]HUANG J J,LI C J,XU Y.Analysis of the Automatic Vectori-zation Cost Model in GCC[C]//Proceedings of the 17th AnnualConference on Computer Engineering and Technology and the 3rd Microprocessor Technology Forum.2013:271-280.
[21]GHASEMIM,AKBARI E,RAHIMNEJAD A,et al.Phasor particle swarm optimization:A simple and efficient variant of PSO[J].Soft Computing,2019,23(19):9701-9718.
[22]JAKUBIK J,BINDING A,FEUERRIEGUL S.Directed particle swarm optimization with Gaussian-process-based function forecasting[J].European Journal of Operational Research,2021,295(1):157-169.
[23]MALEKIS,GAO Y,GARZARÁN M J,et al.An Evaluation of Vectorizing Compilers[C]//International Conference on Parallel Architectures & Compilation Techniques.IEEE,2011:372-382.
[1] LI Hengyi, YANG Guo, WEI Bo, CHEN Hongjun. Research on the Method of C-RAN Networking Planning Based on Clustering Model [J]. Computer Science, 2025, 52(6A): 241000015-4.
[2] WANG Zhen, NIE Kai, HAN Lin. Auto-vectorization Cost Model Based on Instruction MKS [J]. Computer Science, 2024, 51(4): 78-85.
[3] LIU Chenwei, SUN Jian, LEI Bingbing, XU Tao, WU Zhuiwei. Task Scheduling Strategy for Energy Consumption Optimization of Cloud Data Center Based on Improved Particle Swarm Algorithm [J]. Computer Science, 2023, 50(7): 246-253.
[4] WANG Jiaxing, YANG Sijin, ZHUANG Lei, SONG Yu, YANG Xinyu. Multi-objective Online Hybrid Traffic Scheduling Algorithm in Time-sensitive Networks [J]. Computer Science, 2023, 50(7): 286-292.
[5] RUAN Wang, HAO Guosheng, WANG Xia, HU Xiaoting, YANG Zihao. Fusion Multi-feature Fuzzy Model for Target Recognition and Its Application [J]. Computer Science, 2023, 50(6A): 220100138-7.
[6] ZHOU Zhiqiang, ZHU Yan. Local Community Detection Algorithm for Attribute Networks Based on Multi-objective Particle Swarm Optimization [J]. Computer Science, 2023, 50(6A): 220200015-6.
[7] LUO Haiwen, WU Yangjun, SHANG Honghui. Many-core Optimization Method for the Calculation of Ab initio Polarizability [J]. Computer Science, 2023, 50(6): 1-9.
[8] ZOU Chenwei, YAO Rao. Study on Ultrasonic Phased Array Defect Detection Based on Machine Vision [J]. Computer Science, 2023, 50(11A): 230200150-6.
[9] XU Jie, ZHOU Xinzhi. Multi-elite Interactive Learning Based Particle Swarm Optimization Algorithm with Adaptive Bound-handling Technique [J]. Computer Science, 2023, 50(11): 210-219.
[10] ZHAO Dong-mei, WU Ya-xing, ZHANG Hong-bin. Network Security Situation Prediction Based on IPSO-BiLSTM [J]. Computer Science, 2022, 49(7): 357-362.
[11] LIU Zhang-hui, ZHENG Hong-qiang, ZHANG Jian-shan, CHEN Zhe-yi. Computation Offloading and Deployment Optimization in Multi-UAV-Enabled Mobile Edge Computing Systems [J]. Computer Science, 2022, 49(6A): 619-627.
[12] QIU Xu, BIAN Hao-bu, WU Ming-xiao, ZHU Xiao-rong. Study on Task Offloading Algorithm for Internet of Vehicles on Highway Based on 5G MillimeterWave Communication [J]. Computer Science, 2022, 49(6): 25-31.
[13] CHEN Xin, LI Fang, DING Hai-xin, SUN Wei-ze, LIU Xin, CHEN De-xun, YE Yue-jin, HE Xiang. Parallel Optimization Method of Unstructured-grid Computing in CFD for DomesticHeterogeneous Many-core Architecture [J]. Computer Science, 2022, 49(6): 99-107.
[14] LI Xiao-dong, YU Zhi-yong, HUANG Fang-wan, ZHU Wei-ping, TU Chun-yu, ZHENG Wei-nan. Participant Selection Strategies Based on Crowd Sensing for River Environmental Monitoring [J]. Computer Science, 2022, 49(5): 371-379.
[15] GAO Ji-hang, ZHANG Yan. Fault Diagnosis of Shipboard Zonal Distribution Power System Based on FWA-PSO-MSVM [J]. Computer Science, 2022, 49(11A): 210800209-5.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!