Performance Prediction of Regular CUDA Programs By Machine Learning Methods

Document Type : Original Article

Authors

1 Department of Computer Engineering, University of Science and Technology of Mazandaran, Behshahr, Iran

2 Computer Engineering Department, Ferdowsi University of Mashhad, Mashhad, Iran

Abstract

Abstract
Performance predicting of GPUs is a challenge for CUDA programmers and has a wide application in the tuning of these programs. This is because the overheads of CUDA programs may make running programs on a GPU uneconomical. Performance prediction helps the programmer to tune the programs more consciously and find the optimal point of the tuning more accurately instead of trial and error. Having a model that can predict performance can help programmers in manual tuning and source-to-source compiler developers in auto-tuning CUDA programs. In this paper, we presented a performance model for predicting the execution time of a CUDA kernel. In this model, first by using profiling and by using the static analysis of CUDA and PTX codes, two datasets have been created for the execution time of computation-bound and memory-bound kernels. Then, using the methods of the artificial neural network, support vector machine, and extreme learning machine, the execution time of the CUDA kernel is predicted. The experimental results show that the extreme learning machine method can predict the execution time of a computation-bound kernel with a maximum error of 3.42% and the execution time of a memory- bound kernel with a maximum error of 9.84%. The cross-validation method was used to validate the results. Also, by using feature selection methods, the impact of each input feature on kernel execution time has been determined.

Keywords

Main Subjects



Articles in Press, Accepted Manuscript
Available Online from 31 October 2024
  • Receive Date: 29 April 2023
  • Revise Date: 27 November 2023
  • Accept Date: 09 July 2024