The paper, “Estimating GPU Speedups for Programs Without Writing a Single Line of GPU Code” by Newsha Ardalani, Karthikeyan Sankaralingam, Xiaojin Zhu at the University of Wisconsin Madison claims a linear regression model can deliver a robust “automated tool that programmers can use to estimate potential GPU speedup before writing any GPU code”. According to their study a linear-regression model predicted GPU speedups with an average weighted error of 32% when applied to a cross-validation set of test data selected randomly from Rodinia, Parboil, Lonestar and Parsec benchmark suites (speedup range of 5.9× to 276×). Their model does not take into account the overhead for data transfers across the PCIe bus and is not reliable when the application utilizes specialized graphics-related hardware like interpolation in texture memory. The authors believe this work can be extended to predicting power utilization and to investigate performance improvements for new architectures.
A challenges with the approach, as the authors’ note, are subtle and include:
- The preparation of a reasonably representative training data by creating CPU and GPU code to train the model.
- The important features are not know a priori and the speedup function has many variables that influence it.
- From a practical perspective it is not possible to build large training sets with 20× programs compared to the number of features, which is generally considered an acceptable number for a good linear regression model.
The take-away (and YMMV) is that presumably well-written code for massively-parallel devices like GPUs can achieve some form of linear or polynomial performance relative to a CPU.
Leave a Reply