Font Size: a A A

Research On Automatic Optimization Of OpenCL Parameters Based On Hardware Attributes

Posted on:2023-04-11Degree:MasterType:Thesis
Country:ChinaCandidate:J P LiFull Text:PDF
GTID:2558306908465704Subject:Engineering
Abstract/Summary:
OpenCL has become a popular parallel programming framework for heterogeneous parallel computing due to its openness and code portability.OpenCL program do not have efficient performance portability,and need to be re-optimized when porting OpenCL programs across platforms,which is a time-consuming process.So automatic parameter optimization of OpenCL programs parameters has been the focus of research.In the automatic optimization of OpenCL program parameters,there are cases where the tuning parameters are not selected appropriately to effectively exploit the device performance.The search space is usually chosen to be larger to ensure compatibility with multiple devices,this approach leads to inefficient automatic tuning.The search space optimization with the help of experience does not guarantee the tuning effect for unfamiliar devices.There are cases of execution failures during the search process,which incur additional time spent.To solve the above problems,this paper proposes a framework for automatic parameter tuning of OpenCL programs,which effectively uses the device hardware properties to optimize the automatic parameter optimization process.In this paper,we study the tuning parameters determination,search space generation,and search process optimization,and the main work of this paper is as follows.(1)Summarize the OpenCL kernel optimization approach and optimize the OpenCL kernel for the benchmark algorithm,adding new tuning parameters to the traditional tuning parameters to improve the fine-grained control of the OpenCL program execution process.Optimization of the range of tuning parameters for non-2’s nth order scale problems.Summarize the range of tuning parameters and determine the generic search space to ensure that the tuning parameters can effectively exploit the device performance.(2)A method to automatically generate a reduced search space is proposed.The method obtains the streamlined search space by filtering the generic search space with the help of hardware attributes in terms of computational unit load,scheduling batch utilization,scheduling parallelism,etc.In this paper,we propose and design a microbenchmark procedure to extract device hardware attributes.The method effectively reduces the size of the search space and reduces the time spent on the search process.(3)A search process optimization method based on resource consumption analysis is proposed,which can effectively reduce the failure of search process execution.The firefly algorithm and simulated annealing algorithm are also introduced to accelerate the search process..(4)Based on the above research,a new OpenCL parameter auto-tuning framework is designed.The framework has great ease of use,hides the complex OpenCL implementation process and the search space optimization process from the user and provides a simple interface for automatic parameter optimization.The framework performs parameter optimization by iterative parameter configuration.In this paper,we experimentally verify the tuning accuracy and tuning speed of the parameter auto-tuning framework.The experimental results show that the optimized OpenCL kernel improves the performance on the target device by at least 20%.The streamlined search space achieves more than 80% coverage for optimal parameter configurations and near-optimal configurations.The parameter tuning speedup is at least 28% compared to other mainstream tuning frameworks.Improved search space for non-2n scale computational problems results in at least a 10% performance improvement at 2500×2500 problem sizes.
Keywords/Search Tags:Heterogeneous computing, OpenCL, Parameter tuning, Micro benchmark, Hardware parameters
Related items