Megakernels Considered Harmful: Wavefront Path Tracing on GPUs
Abstract
When programming for GPUs, simply porting a large CPU program into an equally large GPU kernel is generally not a good approach. Due to SIMT execution model on GPUs, divergence in control flow carries substantial performance penalties, as does high register usage that lessens the latency-hiding capability that is essential for the high-latency, high-bandwidth memory system of a GPU. In this paper, we implement a path tracer on a GPU using a wavefront formulation, avoiding these pitfalls that can be especially prominent when using materials that are expensive to evaluate. We compare our performance against the traditional megakernel approach, and demonstrate that the wavefront formulation is much better suited for realworld use cases where multiple complex materials are present in the scene.
BibTeX
@inproceedings {10.1145:2492045.2492060,
booktitle = {Eurographics/ ACM SIGGRAPH Symposium on High Performance Graphics},
editor = {Kayvon Fatahalian and Christian Theobalt},
title = {{Megakernels Considered Harmful: Wavefront Path Tracing on GPUs}},
author = {Laine, Samuli and Karras, Tero and Aila, Timo},
year = {2013},
publisher = {ACM},
ISSN = {2079-8687},
ISBN = {978-1-4503-2135-8},
DOI = {10.1145/2492045.2492060}
}
booktitle = {Eurographics/ ACM SIGGRAPH Symposium on High Performance Graphics},
editor = {Kayvon Fatahalian and Christian Theobalt},
title = {{Megakernels Considered Harmful: Wavefront Path Tracing on GPUs}},
author = {Laine, Samuli and Karras, Tero and Aila, Timo},
year = {2013},
publisher = {ACM},
ISSN = {2079-8687},
ISBN = {978-1-4503-2135-8},
DOI = {10.1145/2492045.2492060}
}