Computational & Technology Resources
an online resource for computational,
engineering & technology publications
Computational Science, Engineering & Technology Series
ISSN 1759-3158
CSETS: 34
PATTERNS FOR PARALLEL PROGRAMMING ON GPUS
Edited by: F. Magoulès
Chapter 2

Data Size and Data Type Dynamic GPU Code Generation

H.-P. Charles and V. Lomüller

CEA-LIST, Gif-sur-Yvette, France

Full Bibliographic Reference for this chapter
H.-P. Charles, V. Lomüller, "Data Size and Data Type Dynamic GPU Code Generation", in F. Magoulès, (Editor), "Patterns for Parallel Programming on GPUs", Saxe-Coburg Publications, Stirlingshire, UK, Chapter 2, pp 31-55, 2014. doi:10.4203/csets.34.2
Keywords: dynamic code generation, compiler, GPU programming.

Abstract
In this chapter, we present an unusual strategy to perform dynamic code generation for NVIDIA GPUs. The usual compiler relies on assumptions that are not always true, which can lead to sub-optimal code resulting from a lack of information available to the compiler. By using a code generator deGoal that can produce a code in a pseudo-assembly code representation for NVIDIA GPUs, we will show how to dynamically generate code usable by the GPU. deGoal uses a low level intermediate representation to produce, at run-time, code that benefits from run-time information to produce more optimal and/or flexible GPU routines. This approach removes the need to statically specialize the code for a wide variety of configurations and still produces good performances. We illustrate our tool usage by the matrix multiplication on various configurations. This example shows that it allows us to develop an application and get near optimal results faster than developing a specialized version.

purchase the full-text of this chapter (price £20)

go to the previous chapter
go to the next chapter
return to the table of contents
return to the book description
purchase this book (price £85 +P&P)