Font Size: a A A

Research On OpenCL Program Optimization Method Based On Relational Graph Network

Posted on:2022-08-03Degree:MasterType:Thesis
Country:ChinaCandidate:Y X ZhangFull Text:PDF
GTID:2518306521964299Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
The development and application of heterogeneous devices promote the rapid development of related operating frameworks.As the first cross-platform operating framework,OpenCL represents the current development trend of heterogeneous devices.It can run transparently on heterogeneous units such as multi-core CPUs and GPUs.However,due to the environmental differences of different platforms,the portability of its performance optimization is poor,resulting in low program operation efficiency.The existing OpenCL program optimization method uses natural language processing technology to model and optimizes the program's sequence relationship characteristics to improve its speedup ratio.Because the syntax and semantic relations of the program are ignored,the program operation efficiency is low,and the speedup ratio cannot be further improved.In order to solve the above problems,this thesis proposes an OpenCL program optimization method based on a relational graph network.The core idea is: First,the OpenCL source code is converted to the abstract syntax tree level and the intermediate instruction level to effectively retain the code logic and enrich the syntax and semantic information,and then use the relationship graph network to learn the vector representation of the code,and finally use the decision.The network performs task prediction and completes related optimization tasks.The main research work of this thesis is as follows:(1)This thesis first analyzes the shortcomings of the existing OpenCL program optimization methods from the technical principles and characteristics.The uncertainty of traditional manual extraction of features is studied.When facing the OpenCL program,we discuss the condition of the incompleteness of text processing features,and then the effectiveness of the method in this thesis is studied to achieve higher program operating efficiency.(2)This thesis proposes a source code conversion method to study how to construct sentence-level and node-level edge construction strategies at the abstract syntax tree level and discuss in-depth how to integrate sequence flow,control flow,and data flow information at the intermediate instruction level.In order to further retain the program information at the source code level and the intermediate instruction level,this thesis uses Word2 Vec technology to model the attributes of the nodes in the graph after the graph is transformed and saves the rich information of the code from the structure of the graph and the content of the nodes.(3)Aiming at graph data with multiple types of relationships,we studies how to use advanced graph neural network technology to achieve feature extraction of program graph data.The feature extraction process does not require manual intervention,can effectively consider the types of different relationships,model the edges,learn the program graph's characteristics,and automatically complete the end-to-end feature vector construction.(4)To calculate the effectiveness of this method,we implemented the system framework GraphACL and carried out a lot of comparative experiments based on this framework.Experimental results show that the accuracy rate can reach 88.9% in the heterogeneous mapping task compared with the current state-of-the-art method,and the speedup ratio is increased by 7.56%.Compared with the current state-of-the-art method,the speedup ratio is increased by 5.25% in the thread coarsening task.
Keywords/Search Tags:relational graph network, OpenCL, code to graph, heterogeneous device
PDF Full Text Request
Related items