Font Size: a A A

Research On Compiler Optimization Based On OpenCL

Posted on:2022-08-23Degree:MasterType:Thesis
Country:ChinaCandidate:Y LiangFull Text:PDF
GTID:2518306605489344Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
At present,OpenCL has become a research hotspot in the field of heterogeneous parallel computing due to its openness,easy portability,and multi-interface characteristics.At the same time,it is widely used on builiding a compilation environment for heterogeneous platforms because of its great underlying hardware support.The structural characteristics of the hardware platform make it necessary to rewrite the compilation environment and lack a unified compilation framework.At the same time,there are big problems in the execution efficiency of parallel code based on OpenCL,and it is difficult to tune the code manually.In response to the above problems,this article builds an automatic tuning framework based on OpenCL,it can perform automatic tuning through iterative execution of kernel functions.and it also introduces heuristic algorithms to accelerate tuning.At meanwhile the article focuses on kernel code optimization,portability and performance of the tuning framework.The main work completed in this paper is as follows:1.Propose a compilation automatic optimization framework ITN(Intelligent-Tuner),which has high ease of use and easy scalability.High ease of use means it has a simple interface,and easy scalability means it can add a small amount of the code to adds the types of parameters and kernel functions.ITN builds a kind of kernels based on OpenCL,it can optimize the parameter configuration and evaluate the computing performance of the hardware under a specific parameter configuration through the execution time of the kernel function.The computing performance will be used as an index to search for the best parameter configuration.ITN supports a variety of compilation parameters,which will be helpful to get best parameter configuration which make the kernel code executes most efficiently.2.A variety of intelligent algorithms are introduced,such as particle swarm optimization,ant colony algorithm,etc.The parameter configuration is used as a fitness function to search in the parameter space,and the algorithm steps are improved to adapt to the high parallelism The kernel code.The article uses the preset constraints of the algorithm initial value and the improvement of the fitness function.It will effectively reduce the parameter search space and the search time,and it will also improve the tuning speed.3.A benchmark test model based on the convolution kernel is proposed.Through ITN,the parameters of each layer of the convolutional neural network are split and stored,and operator kernels with different parameters are obtained.Perform benchmark tests based on the convolution kernel.The article uses convolution kernels of different sizes to verify the performance of compilation.The calculation performance and search time are used as test indicators to analyze the tuning performance.This article compares the hardware computing performance under different parameters and algorithms through experiments.The experimental results show that compared to the untuned kernel,the computing performance has increased by 60%,and the search speed has increased by 40%.At the same time,compared with the current framework,the search speed is 30% higher than the most advanced tuning framework.Finally,an analysis of ITN portability under multiple platforms is carried out,which proves that ITN has important theoretical research significance and engineering application value.
Keywords/Search Tags:OpenCL, Intelligent algorithm, Automatic parameter adjustment, Benchmark test, Performance optimization
PDF Full Text Request
Related items