Megakernels considered harmful: wavefront path tracing on GPUs

  • Authors:
  • Samuli Laine;Tero Karras;Timo Aila

  • Affiliations:
  • NVIDIA;NVIDIA;NVIDIA

  • Venue:
  • Proceedings of the 5th High-Performance Graphics Conference
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

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 us-age 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 real-world use cases where multiple complex materials are present in the scene.