Zorua: Enhancing Programming Ease, Portability, and Performance in GPUs by Decoupling Programming Models from Resource Management

Nandita Vijaykumar, Kevin Hsieh, Gennady Pekhimenko, Samira Manabi Khan, Ashish Shrestha, Saugata Ghose, Phillip B. Gibbons, Onur MutluarXiv 2018

Introduction

Modern GPU programming frameworks, such as CUDA and OpenCL, require developers to statically manage hardware resources. Programmers must specify the exact number of registers per thread, scratchpad memory per block, and the total number of threads. This tight coupling between software and hardware creates significant challenges for programming ease, code portability, and resource efficiency. Zorua addresses these issues by introducing a resource virtualization framework that decouples the programming model from underlying hardware constraints.

The Problem: Performance Cliffs and Static Allocation

The static nature of resource allocation in current GPUs leads to "performance cliffs." A minor change in register usage can prevent the GPU from fitting an additional thread block on a core, resulting in a massive drop in throughput. Furthermore, code tuned for one GPU generation often performs poorly on another due to varying resource ratios. Finally, static allocation fails to exploit "dynamic slack"—resources reserved for worst-case scenarios that remain idle during most of a kernel's execution.

Performance cliffs in GPU execution time as a function of threads per block and register usage.

The Zorua Framework

Zorua treats GPU resources like virtual memory, providing the illusion of more resources than are physically available. It employs several key components to achieve this:

  • Virtualization and Oversubscription: Zorua allows kernels to use more registers than physically present by using a swap space in main memory.
  • Phase-Based Management: The compiler partitions kernels into "phases" with similar resource requirements. Phase specifiers are inserted to inform the hardware of upcoming resource needs.
  • The Coordinator: A hardware runtime system manages active threads, deciding which are schedulable (on-chip) and which are pending (swapped out).
  • Adaptive Control: To mitigate swapping overhead, an adaptive algorithm monitors core idleness and memory pressure to dynamically adjust the oversubscription threshold.

Evaluation and Results

The researchers evaluated Zorua using 20 diverse GPGPU workloads from suites like Rodinia and Lonestar across simulated Fermi, Kepler, and Maxwell architectures.

Normalized performance across a diverse set of GPGPU workloads.

Key findings include:

  • Performance Smoothing: Zorua reduces performance variation across different resource specifications by 50% on average, effectively eliminating performance cliffs.
  • Enhanced Portability: When migrating code between GPU generations, Zorua reduces maximum performance loss by 55% (up to 73%).
  • Higher Throughput: Even for highly tuned code, Zorua improves performance by 13% on average (up to 28%) by utilizing dynamic slack.
  • Energy Efficiency: Total system energy was reduced by 7.6% on average due to improved resource utilization and faster execution times.

Conclusion

Zorua demonstrates that indirection is a powerful tool for GPU architecture. By virtualizing on-chip resources and managing them holistically at the granularity of phases, Zorua simplifies programming, ensures portability across generations, and unlocks performance gains from dynamic resource slack with negligible hardware overhead.

Summary updated

BibTeX
@misc{vijaykumar2018zorua,
  author = {Nandita Vijaykumar and Kevin Hsieh and Gennady Pekhimenko and Samira Manabi Khan and Ashish Shrestha and Saugata Ghose and Phillip B. Gibbons and Onur Mutlu},
  title = {{Zorua: Enhancing Programming Ease, Portability, and Performance in GPUs by Decoupling Programming Models from Resource Management}},
  year = {2018},
  eprint = {1802.02573},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1802.02573},
}
Figure