Matrix Multiplication Vector Code Generation Based on Polyhedron Model - Wang, Bo-Yang; Pang, Jian-Min; Xu, Jin-Long; Zhao, Jie; Tao, Xiao-Han; Zhu, Yu (Ji suan ji ke xue, 2022)
Matrix multiplication is the core of many scientific calculations, and vectorized programming is one of the main means to improve its performance.In view of the existing vectorization optimization problems that often require manual tuning and need to be mapped to the hardware structure, based on the polyhedron compiler PPCG,a vector code generation framework is introduced into the polyhedron model, and a matrix multiplication vector code generation framework based on the polyhedron model is proposed.Through the profit analysis of the matrix multiplication vectorization program, the vectorization program is determined, and the code generation of the application framework is guided.Based on this framework, it is conducive to the rapid optimization of vectorization of matrix multiplication.Selecting 13 matrix multiplication cases with a scale between 64×64×64 and 1 024×1 024×1 024 for experiments.The results show that the framework can generate vectorized code correctly.Compared with the automatic vectorization