[Paper Review] Improving Locality of Unstructured Mesh Algorithms on GPUs
This paper proposes a library-based optimization technique to improve data locality in unstructured mesh algorithms on GPUs by leveraging shared memory and two-layered coloring to enhance spatial and temporal locality. By transparently reordering kernel operations and data access without algorithmic changes, the approach achieves 1.2× to 2.5× speedups on Pascal and Volta GPUs across scientific kernels from applications like Airfoil and miniAero.
To most efficiently utilize modern parallel architectures, the memory access patterns of algorithms must make heavy use of the cache architecture: successively accessed data must be close in memory (spatial locality) and one piece of data must be reused as many times as possible (temporal locality). In this work we analyse the performance of unstructured mesh algorithms on GPUs, specifically the use of the shared memory and two-layered colouring to cache the data. We also look at different block layouts to analyse the trade-off between data reuse and the amount of synchronisation. We developed a standalone library that can transparently reorder the operations done and data accessed by a kernel, without modifications to the algorithm by the user. Using this, we performed measurements on relevant scientific kernels from different applications, such as Airfoil, Volna, Bookleaf, Lulesh and miniAero; using Nvidia Pascal and Volta GPUs. We observed significant speedups ($1.2 ext{--}2.5 imes$).
Motivation & Objective
- To improve data locality in unstructured mesh algorithms running on modern GPUs.
- To reduce global memory access by enhancing spatial and temporal locality through shared memory and coloring strategies.
- To develop a transparent library that reorders operations and data access without requiring changes to user kernels.
- To evaluate the performance trade-offs between data reuse and synchronization overhead in different block layouts.
- To measure the effectiveness of the optimization on real-world scientific kernels from diverse applications.
Proposed method
- The method employs two-layered coloring to group data accesses and improve reuse in shared memory.
- It uses a standalone library to automatically reorder kernel operations and data access patterns transparently.
- The approach leverages GPU shared memory to cache frequently accessed data, reducing global memory traffic.
- Different block layouts are evaluated to balance data reuse and synchronization cost.
- The optimization is applied to kernels from scientific applications such as Airfoil, Volna, Bookleaf, Lulesh, and miniAero.
- Performance is measured on Nvidia Pascal and Volta GPUs using representative scientific workloads.
Experimental results
Research questions
- RQ1How does two-layered coloring improve data locality in unstructured mesh kernels on GPUs?
- RQ2What is the performance impact of using shared memory to cache data in unstructured mesh algorithms?
- RQ3How do different block layouts affect the trade-off between data reuse and synchronization overhead?
- RQ4To what extent can a transparent library optimize memory access patterns without modifying the original kernel code?
- RQ5What performance gains can be achieved on real scientific kernels using these locality optimization techniques?
Key findings
- The proposed optimization achieved speedups ranging from 1.2× to 2.5× on Nvidia Pascal and Volta GPUs.
- The use of shared memory and two-layered coloring significantly improved data reuse and reduced global memory access.
- The library successfully reorganized data access and kernel operations without requiring changes to the original algorithm.
- Different block layouts revealed a measurable trade-off between synchronization cost and data reuse efficiency.
- The approach demonstrated consistent performance improvements across diverse scientific kernels, including Airfoil, Volna, Bookleaf, Lulesh, and miniAero.
- The results confirm that locality optimization is effective even in complex unstructured mesh workloads with irregular memory access patterns.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.