GPU Computing Gems Jade Edition

GPU Computing Gems Jade Edition

Applications of GPU Computing Series
2012, Pages 399-407
GPU Computing Gems Jade Edition

Chapter 29 - Accelerating Development and Execution Speed with Just-in-Time GPU Code Generation

https://doi.org/10.1016/B978-0-12-385963-1.00029-0Get rights and content

Publisher Summary

This chapter describes a method for automatically generating OpenCL kernels to perform a calculation. The design of numerical software involves trade-offs between speed, flexibility, and ease of use. At one extreme, the developer implements only a fixed set of calculations, optimizing each one by hand, yielding excellent speed, but very little flexibility. At the opposite extreme, the developer creates a flexible environment that can perform a wide range of computations, but typically with much worse performance. A third option is to create a framework in which users implement their own computations in a language such as OpenCL or OpenGL Shading Language (GLSL). This option provides both flexibility and speed, but requires much effort and programming expertise from the users. The need for flexibility is a common problem in numerical software. At the heart of every molecular simulation is the “force field” that describes how atoms should interact with each other. This set of equations defines the energy of the system as a function of the positions of all the atoms involved. The gradient of the energy then gives the force on each atom. Writing a plug-in to implement a new interaction takes a lot of work and requires knowledge of GPU programming. The most direct way to evaluate the performance of this approach is to compare the generated code to a hand-optimized implementation of the same force. The other way to evaluate performance is by execution time.

References (0)

Cited by (0)

View full text