Enhancing a GPU-Based Wave Propagation Application Through Loop Tiling and Loop Fission Optimizations

  • Conference paper
  • First Online:
High Performance Computing (CARLA 2023)

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Germany)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 58.84
Price includes VAT (Germany)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 74.89
Price includes VAT (Germany)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Kukreja, N., Louboutin, M., Vieira, F., Luporini, F., Lange, M., Gorman, G.: Devito: automated fast finite difference computation. In: 2016 Sixth International Workshop on Domain-Specific Languages and High-Level Frameworks for High Performance Computing (WOLFHPC), pp. 11–19. IEEE (2016)

    Google Scholar 

  2. Lange, M., et al.: Devito: towards a generic finite difference DSL using symbolic python. In: 2016 6th Workshop on Python for High-Performance and Scientific Computing (PyHPC), pp. 67–75. IEEE (2016)

    Google Scholar 

  3. OpenACC. OpenACC Programming and Best Practices Guide (2022). https://www.openacc.org/sites/default/files/inline-files/openacc-guide.pdf

  4. Jeffers, J., Reinders, J.: High Performance Parallelism Pearls Volume Two: Multicore and Many-Core Programming Approaches. Morgan Kaufmann, Burlington (2015)

    Google Scholar 

  5. McKinley, K.S., Carr, S., Tseng, C.-W.: Improving data locality with loop transformations. ACM Trans. Program. Lang. Syst. (TOPLAS) 18(4), 424–453 (1996)

    Google Scholar 

  6. Kandemir, M., Ramanujam, J., Choudhary, A.: Improving cache locality by a combination of loop and data transformations. IEEE Trans. Comput. 48(2), 159–167 (1999)

    Google Scholar 

  7. Virieux, J.: P-SV wave propagation in heterogeneous media: velocity-stress finite-difference method. Geophysics 51(4), 889–901 (1986)

    Article  Google Scholar 

  8. Louboutin, M., et al.: Scaling through abstractions-high-performance vectorial wave simulations for seismic inversion with devito. ar**v preprint ar**v:2004.10519 (2020)

  9. Jesus, L., Nogueira, P., Speglich, J., Boratto, M.: GPU performance analysis for viscoacoustic wave equations using fast stencil computation from the symbolic specification. J. Supercomput. 1–16 (2023)

    Google Scholar 

  10. Nvidia. Nsight Systems: Developer Tools Documantation (2023). https://docs.nvidia.com/nsight-systems/UserGuide/index.html

  11. Nvidia. Nsight Compute: Developer Tools Documantation (2023). https://docs.nvidia.com/nsight-compute/NsightCompute/index.html

  12. Cardoso, J.M.P., de Figueired Coutinho, J.G., Diniz, P.C.: Embedded Computing for High Performance: Efficient Map** of Computations Using Customization, Code Transformations and Compilation, pp. 137–183. Morgan Kaufmann, Burlington (2017)

    Google Scholar 

  13. Aminzadeh, F., Burkhard, N., Long, J., Kunz, T., Duclos, P.: Three dimensional SEG/EAEG models-an update. Leading Edge 15(2), 131–134 (1996)

    Google Scholar 

Download references

Acknowledgements

This work was developed in partnership between SENAI CIMATEC and PETROBRAS. The authors acknowledge PETROLEO BRASILEIRO S.A and the Agência Nacional de Petróleo, Gás Natural e Biocombustível (ANP), for their support and investment in research and development.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gabriel Costa .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Costa, G., Nogueira, P., Speglich, J., Silva, L. (2024). Enhancing a GPU-Based Wave Propagation Application Through Loop Tiling and Loop Fission Optimizations. In: Barrios H., C.J., Rizzi, S., Meneses, E., Mocskos, E., Monsalve Diaz, J.M., Montoya, J. (eds) High Performance Computing. CARLA 2023. Communications in Computer and Information Science, vol 1887. Springer, Cham. https://doi.org/10.1007/978-3-031-52186-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-52186-7_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-52185-0

  • Online ISBN: 978-3-031-52186-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation