Stencil computations are an important class of compute and data intensive programs that occur widely in scientific and engineeringapplications. A number of tools use sophisticated tiling, parallelization, and memory mapping strategies, and generate code that relies on vendor-supplied compilers. This code has a number of parameters, such as tile sizes, that are then tuned via empirical exploration. We develop a model that guides such a choice. Our model is a simple set of analytical functions that predict the execution time of the generated code. It is deliberately optimistic, since tile sizes and, moreover, the optimistic assumptions are intended to enable we are targeting modeling and parameter selections yielding highly tuned codes. We experimentally validate the model on a number of 2D and 3D stencil codes, and show that the root mean square error in the execution time is less than 10% for the subset of the codes that achieve performance within 20% of the best. Furthermore, based on using our model, we are able to predict tile sizes that achieve a further improvement of 9% on average.
The rapid evolution of GPU architectures necessitates advanced modeling techniques for optimization and understanding their intricate functionalities. The Performance Prediction Toolkit for GPUs (PPT-GPU) is an innovative modeling tool developed to deliver detailed modeling of GPU architectures. It allows researchers and developers to understand, analyze, and predict the behavior of different GPU components under various computational loads. PPT-GPU is invaluable in enabling detailed insights into GPU architectures, such as memory performance metrics, total active cycles, and utilization of GPU resources. This paper extends PPT-GPU to model the NVIDIA Ampere architecture. Specifically, we focus on modeling the shared memory and the register spilling represented by the local memory operations. We have used several performance metrics to validate our work against Nvidia Nsight. Additionally, our refined version of PPT-GPU offers detailed metrics, capturing active cycles of functional units, an essential aspect in analyzing application performance constraints. The enhanced PPT-GPU has an average prediction error of 14.6% for total active cycles and 13% and 13.3% for the L1 and L2 hit rates, respectively.
3 July 2019 in IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
We propose an optimization approach for determining both hardware and software parameters for the efficient implementation of a (family of) applications called dense stencil computations on programmable general purpose computing on graphics processing units. We first introduce a simple, analytical model for the silicon area usage of accelerator architectures and a workload characterization of stencil computations. We combine this characterization with a parametric execution-time model and formulate a mathematical optimization problem that seeks to maximize a common objective function of all the hardware and software parameters . The solution to this problem, therefore, “solves” the codesign problem: simultaneously choosing software–hardware parameters to optimize total performance. We validate this approach by proposing architectural variants of the NVIDIA Maxwell GTX-980 (respectively, Titan X) specifically tuned to a predetermined workload of four common 2-D stencils (Heat, Jacobi, Laplacian, and Gradient) and two 3-D ones (Heat and Laplacian). Our model predicts that performance would potentially improve by 28% (respectively, 33%) with simple tweaks to the hardware parameters, such as tuning the number of streaming multiprocessors, the number of compute cores each contains, and the size of shared memory. We also develop a number of insights about the optimal regions of the design landscape.