Skip to main content

Optimizations with CUDA: A Case Study on 3D Curve-Skeleton Extraction from Voxelized Models

  • Conference paper
Computer Vision, Imaging and Computer Graphics. Theory and Application

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 359))

Abstract

In this paper, we show how we have coded and optimized a complex and not trivially parallelizable case study: a 3D curve-skeleton calculation algorithm. For this we use NVIDIA CUDA, which allows the programmer to easily code algorithms for executing in a parallel way on NVIDIA GPU devices. However, when working with algorithms that have high data-sharing or data-dependence requirements, like the curve-skeleton calculation, it is not always a trivial task to achieve acceptable acceleration rates. So we detail step by step a comprehensive collection of optimizations to be considered in this class of algorithms, and in general in any CUDA implementation. Two different GPU architectures have been used to test the implications of each optimization, the NVIDIA GT200 architecture and the Fermi GF100. As a result, although the first direct CUDA implementation of our algorithm ran even slower than its CPU version, overall speedups of 19x (GT200) and 68x (Fermi GF100) were finally achieved.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. NVIDIA: NVIDIA CUDA C Programming Guide, Version 4.2 (2012), http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Programming_Guide.pdf

  2. Khronos OpenCL Working Group: The OpenCL Specification, Version 1.2 (2012), http://www.khronos.org/opencl

  3. Kong, J., Dimitrov, M., Yang, Y., Liyanage, J., Cao, L., Staples, J., Mantor, M., Zhou, H.: Accelerating MATLAB Image Processing Toolbox Functions on GPUs. In: Proc. of the Third Workshop on General-Purpose Computation on Graphics Processing Units (GPGPU-3), Pittsburgh, PA, USA (March 2010)

    Google Scholar 

  4. NVIDIA: NVIDIA CUDA Best Practices Guide v4.1 (2012), http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Best_Practices_Guide.pdf

  5. Kirk, D.B., Hwu, W.W.: Programming Massively Parallel Processors. Hands-on Approach. Morgan Kaufmann Publishers, Burlington (2010)

    Google Scholar 

  6. Sanders, J., Kandrot, E.: CUDA by Example. An Introduction to General-Purpose GPU Programming. Addison-Wesley (2010)

    Google Scholar 

  7. Huang, Q., Huang, Z., Werstein, P., Purvis, M.: GPU as a General Purpose Computing Resource. In: Proc. of the International Conference on Parallel and Distributed Computing. Applications and Technologies, pp. 151–158 (2008)

    Google Scholar 

  8. Ryoo, S., Rodrigues, C.I., Baghsorkhi, S.S., Stone, S.S., Kirk, D.B., Hwu, W.W.: Optimization Principles and Application Performance Evaluation of a Multithreaded GPU Using CUDA. In: Proc. of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (2008)

    Google Scholar 

  9. Feinbure, F., Troger, P., Polze, A.: Joint Forces: From Multithreaded Programming to GPU Computing. IEEE Software 28(3), 51–57 (2011)

    Article  Google Scholar 

  10. Wittenbrink, C.M., Kilgariff, E., Prabhu, A.: Fermi GF100 GPU Architecture. IEEE Micro 31, 50–59 (2011)

    Article  Google Scholar 

  11. Reyes, R., de Sande, F.: Optimize or wait? Using llc fast-prototyping tool to evaluate CUDA optimizations. In: Proceedings of 19th International Euromicro Conference on Parallel, Distributed and Network-Based Processing, pp. 257–261 (2011)

    Google Scholar 

  12. Torres, Y., González-Escribano, A., Llanos, D.R.: Understanding the Impact of CUDA Tuning Techniques for Fermi. In: Proceedings of the 2011 International Conference on High Performance Computing and Simulation, HPCS, Number 5999886, pp. 631–639 (2011)

    Google Scholar 

  13. Cornea, N., Silver, D., Min, P.: Curve-skeleton Properties, Applications and Algorithms. IEEE Transactions on Visualization and Computer Graphics 13, 530–548 (2007)

    Article  Google Scholar 

  14. Palágyi, K., Kuba, A.: A Parallel 3D 12-Subiteration Thinning Algorithm. Graphical Models and Image Processing 61, 199–221 (1999)

    Article  Google Scholar 

  15. Stanford University: The Stanford 3D Scanning Repository (2012), http://graphics.stanford.edu/data/3Dscanrep

  16. AIM: AIM@SHAPE REPOSITORY (2012), http://shapes.aimatshape.net

  17. 3DVIA: 3DVIA REPOSITORY (2012), http://www.3dvia.com

  18. NVIDIA: Compute Visual Profiler, User Guide (2011), http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/Compute_Visual_Profiler_User_Guide.pdf

  19. Price, D.K., Humphrey, J.R., Spagnoli, K.E., Paolini, A.L.: Analyzing the Impact of Data Movement on GPU Computations. In: Proc. of the SPIE - The International Society for Optical Engineering, vol. 7705 (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jiménez, J., Ruiz de Miras, J. (2013). Optimizations with CUDA: A Case Study on 3D Curve-Skeleton Extraction from Voxelized Models. In: Csurka, G., Kraus, M., Laramee, R.S., Richard, P., Braz, J. (eds) Computer Vision, Imaging and Computer Graphics. Theory and Application. Communications in Computer and Information Science, vol 359. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38241-3_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-38241-3_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-38240-6

  • Online ISBN: 978-3-642-38241-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics