Enhancing a GPU-Based Wave Propagation Application Through Loop Tiling and Loop Fission Optimizations
摘要
Graphics Processing Units (GPUs) harbor immense parallelization capabilities that can significantly accelerate the processing of large datasets. In the context of geophysical modeling, these capabilities can be harnessed to achieve faster execution times without compromising the accuracy of results. This study investigates optimization techniques implemented in a three-dimensional elastic model developed using the DEVITO tool. DEVITO is a Domain-Specific Language for stencil computation, with a focus on seismic inversion problems. DEVITO enables the creation of geophysical models in Python through functions and classes provided by the tool. Using an internal compiler, DEVITO can translate the model written from symbolic equations in Python into a finite difference code in C/C++. The performance of an initial naive implementation is compared against two optimized versions. One of the approaches was named Tiling, and uses the OpenACC tile directive to block the most relevant loop nests of the application. The other optimized approach, Sig Fission, uses the loop fission technique to divide the workload of one of the nests and then applies the tile directive. These optimizations have led to notable improvements, including an increased cache hit rate, enhanced GPU scheduler occupancy, a decrease in the number of registers needed to issue instructions, and a remarkable 40% reduction in execution time. By capitalizing on the parallel computing power of GPUs, this study demonstrates the efficacy of employing optimization strategies, such as loop tiling and loop fission, in geophysical modeling targeting graphics processing units. These techniques pave the way for accelerated data processing, ultimately contributing to improved efficiency and accuracy in computational geophysics, without any loss of integrity in the results.