Font Size: a A A

Research On The Auto-vectorization In Multi-thread And Multi-SIMD Parallelism

Posted on:2014-08-29Degree:MasterType:Thesis
Country:ChinaCandidate:J J HuangFull Text:PDF
GTID:2308330479479255Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Currently, the mainstream general purpose microprocessors have implemented multi-core parallelism on chip and SIMD parallelism in each core. Multi-thread parallelism and each thread makes use of SIMD parallelism as much as possible is an inevitable choice for fully exploiting the performance of such microprocessors.The development of multi-core and multi-SIMD architecture needs suitable programming models and compiler optimization techniques. Our research focuses on the compiler auto-vectorization under multi-thread and multi-SIMD parallelism.The programming interface and compilation implenmentation of OpenMP is the de facto mechanism for multi-thread parallelism, the typical compilers support auto-vectorization for SIMD parallelism as well as OpenMP parallelism, but the effect is still far from the expectation.Firstly, we investigate auto-vectorization technology for SIMD parallelism, analyze the compilation framework of auto-vectorization based on the GCC compiler, and make a detailed analysis of the implementation process of auto-vectorization.Secondly, by analyzing the typical parallel loops, we find GCC has supported diverse form auto-vectorization under multi-thread parallelism, but for some data assignment loops, the compiler auto-vectorization failed.Then, based on the investigation of the implementation of OpenMP compilation and auto-vectorization in GCC, we analyze the compiler implementation process of OpenMP, focusing on the cost model of auto-vectorization in GCC complier. The cost model of auto-vectorization has abstracted many factors to be considered for auto-vectorization. We find the data alignment attribute computated by the cost model of auto-vectorization is not accurate, which get the cost model of auto-vectorization making an inaccurate estimation, and affects the auto-vectorization under multi-thread parallelism for some data assignment loops.Finally, we implement auto-vectorization optimization in GCC based on data alignment directives. We extend OpenMP directives with clause(aligned) which determines the data alignment attribute of OpenMP program. By modifying the frontend and backend in OpenMP compilation, passing data alignment attribute to the compiler auto-vectorization stage, our work enable complier make more accurate calculation of auto-vectorization cost, then the typical loops can be auto-vectorized under multi-thread parallelism. Experiments show that our work achieves better acceleration for the nested data assignment loops.
Keywords/Search Tags:Multi-thread, Multi-SIMD, Auto-Vectorization, Open MP, GCC, Data Alignment Attribute Directive Clause
PDF Full Text Request
Related items