Skip to main content
QUICK REVIEW

[Paper Review] Optimization of Tensor-product Operations in Nekbone on GPUs

Martin Karp, Niclas Jansson|arXiv (Cornell University)|May 27, 2020
Parallel Computing and Optimization TechniquesComputer Science11 references5 citations
TL;DR

This paper optimizes tensor-product operations in Nekbone, a proxy application for the Nek5000 CFD solver, using a CUDA-based 2D thread structure to improve memory access patterns and enable efficient loop unrolling, shared memory usage, and register optimization. The implementation achieves 77–92% of peak performance on both V100 and P100 GPUs for polynomial degree 9 and input sizes of 1024–4096 elements, outperforming prior GPU versions by 6–10%.

ABSTRACT

In the CFD solver Nek5000, the computation is dominated by the evaluation of small tensor operations. Nekbone is a proxy app for Nek5000 and has previously been ported to GPUs with a mixed OpenACC and CUDA approach. In this work, we continue this effort and optimize the main tensor-product operation in Nekbone further. Our optimization is done in CUDA and uses a different, 2D, thread structure to make the computations layer by layer. This enables us to use loop unrolling as well as utilize registers and shared memory efficiently. Our implementation is then compared on both the Pascal and Volta GPU architectures to previous GPU versions of Nekbone as well as a measured roofline. The results show that our implementation outperforms previous GPU Nekbone implementations by 6-10%. Compared to the measured roofline, we obtain 77 - 92% of the peak performance for both Nvidia P100 and V100 GPUs for inputs with 1024 - 4096 elements and polynomial degree 9.

Motivation & Objective

  • To improve the performance of tensor-product operations in Nekbone, a proxy application for the Nek5000 CFD solver, on GPU architectures.
  • To overcome performance limitations in prior GPU implementations of Nekbone that used a mixed OpenACC and CUDA approach.
  • To explore alternative thread mapping strategies that enhance memory access efficiency and enable better utilization of GPU resources such as shared memory and registers.
  • To evaluate the performance of the optimized kernel against previous GPU versions and a measured roofline model on modern GPU architectures.

Proposed method

  • Adopting a CUDA-based implementation with a 2D thread structure to process tensor operations layer by layer, improving data locality and memory access patterns.
  • Employing loop unrolling to reduce loop overhead and improve instruction-level parallelism in the kernel.
  • Utilizing shared memory to reduce global memory access and increase data reuse across threads.
  • Optimizing register usage through careful kernel design and data layout to minimize register pressure.
  • Mapping the computation to GPU thread blocks in a way that aligns with the tensor-product computation pattern to maximize occupancy and memory bandwidth utilization.

Experimental results

Research questions

  • RQ1How does a 2D thread mapping strategy improve the performance of tensor-product operations in Nekbone compared to prior 1D or mixed-approach GPU implementations?
  • RQ2To what extent can loop unrolling and shared memory optimization enhance performance in GPU-accelerated tensor operations for spectral element methods?
  • RQ3What is the achievable performance of the optimized kernel relative to the theoretical roofline on modern GPU architectures such as Volta and Pascal?
  • RQ4How does the new implementation compare in performance to previous GPU versions of Nekbone across varying problem sizes and polynomial degrees?

Key findings

  • The optimized CUDA kernel achieves 77–92% of the theoretical peak performance on both NVIDIA V100 and P100 GPUs for input sizes of 1024–4096 elements and polynomial degree 9.
  • The implementation outperforms previous GPU versions of Nekbone by 6–10% across all tested configurations.
  • The 2D thread structure enables effective loop unrolling and better utilization of shared memory and registers, contributing to the performance gains.
  • The performance improvement is consistent across both Volta and Pascal GPU architectures, indicating strong portability and scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.