Title :
Target-Specific Refinement of Multigrid Codes
Author :
Membarth, Richard ; Slusallek, Philipp ; Koster, Marcel ; Leissa, Roland ; Hack, Sebastian
Abstract :
This paper applies partial evaluation to stage a stencil code Domain-Specific Language (DSL) onto a functional and imperative programming language. Platform-specific primitives such as scheduling or vectorization, and algorithmic variants such as boundary handling are factored out into a library that make up the elements of that DSL. We show how partial evaluation can eliminate all overhead of this separation of concerns and creates code that resembles hand-crafted versions for a particular target platform. We evaluate our technique by implementing a DSL for the V-cycle multigrid iteration. Our approach generates code for AMD and NVIDIA GPUs (via SPIR and NVVM) as well as for CPUs using AVX/AVX2 alike from the same high-level DSL program. First results show that we achieve a speedup of up to 3x on the CPU by vectorizing multigrid components and a speedup of up to 2x on the GPU by merging the computation of multigrid components.
Keywords :
grid computing; iterative methods; programming languages; specification languages; AMD; CPU; DSL; NVIDIA GPU; V-cycle multigrid iteration; multigrid component vectorization; platform-specific primitive; programming language; stencil code domain-specific language; target-specific refinement; Clamps; Computer architecture; DSL; Graphics processing units; Libraries; Merging; Optimization; Multigrid codes; partial evaluation; domain-specific language;
Conference_Titel :
Domain-Specific Languages and High-Level Frameworks for High Performance Computing (WOLFHPC), 2014 Fourth International Workshop on
DOI :
10.1109/WOLFHPC.2014.5