Quantcast
Explainer

What is CUDA?

You may not realize it, but GPUs are good for much more than videogames and scientific research. In fact, there is a good chance that your daily life is being affected by GPU computing.

Mobile applications rely on GPUs running servers in the cloud. Stores use GPUs to analyze retail and web data. Web sites use GPUs to more accurately place ads. Engineers rely on them in computer-aided engineering applications. Accelerated computing using GPUs continues to expand at an astounding rate.

No longer is it something that the high-performance computing (HPC) community takes sole advantage of. The benefits are moving mainstream.

Even with this broad and expanding interest, as I travel across the United States educating researchers and students about the benefits of GPU acceleration, I routinely get asked the question “what is CUDA?”

Most people confuse CUDA for a language or maybe an API. It is not.

It is much more than that. CUDA is a parallel computing platform and programming model that makes using a GPU for general purpose computing simple and elegant. The developer still programs in the familiar C, C++, Fortran, or an ever expanding list of supported languages, and incorporates extensions of these languages in the form of a few basic keywords.

These keywords let the developer express massive amounts of parallelism and direct the compiler to the portion of the application that maps to the GPU.

A simple example of code is shown below, written first in plain “C” and then in “C with CUDA extensions.”

Sample code - standard C code on the left, C with CUDA extensions on the right.

Learning how to program using the CUDA parallel programming model is easy. We have webinars and self-study exercises at the CUDA Developer Zone website.

In addition to toolkits for C, C++, and Fortran, there are tons of libraries optimized for GPUs and other programming approaches such as the OpenACC directive based compilers.

Check it out.  And be sure to let us know how you’re using CUDA to advance your work.

  • Agastya Parikh

    Is there a person to contact for help with coding projects that are based on CUDA?

  • http://pulse.yahoo.com/_DG3C4YLOA4CXJTEG3KAG3VEO3I abhinuke

    4096 blocks   :O :O :O  ….what architecture is this? kepler? and what compute capability are we using here in example code?

  • http://www.accelereyes.com/ AccelerEyes

    You can contact us at AccelerEyes (support@accelereyes.com) and we’re happy to help.

  • mebersole

    You can try posting your questions on stackoverflow.com using the CUDA tag (or the NVIDIA forums when they’re back up). Lots of NVIDIA engineers and other CUDA experts monitor the forums.

  • mebersole

    Launching 4096 blocks would work on any Compute capable device.  In fact you can have up to 65535 blocks in the x-direction for Compute capability up to 2.x and 2^31-1 for 3.0!  The Compute driver will just keep scheduling blocks until all have been executed on the hardware.

  • Agastya Parikh

    Thank you everyone! 

  • Agastya Parikh

    Thank you everyone! 

  • abhinole

     …ahhh….I use Fermi with CC 2.0….and I just realized that even I can launch 4096 blocks…..Thanks for your reply….

  • Sumit Gupta

    There are several companies that specialize in helping developers in accelerating their applications using GPUs.  Some of them are listed here
    http://www.nvidia.com/object/cuda_consultants.html 

  • http://twitter.com/salmanulhaq Salman Ul Haq

     If it’s anything related to Vision/Imaging OR data-security/compression, contact me at salman@tunacode.com and I’ll be happy to help.

  • http://www.facebook.com/profile.php?id=100001874671598 Hamza Mehkzoum

    Awesome :D

  • http://www.facebook.com/brett.viddal Brett Viddal

    Finally! I’ve been asking everyone who knows anything about video cards what CUDA is and nobody had been able to tell me. THANK YOU

  • yekcheshme

    I installed Geforce Quadro 6000 x 2(16G) drivers, but I use Maya Mental rey render it’s freezed. if I install CUDA ,can I solve that problem ? abdusemet.abduqadir@qarluq.com

  • rndtechnologies786

    Thank you for this
    blog.           

  • http://www.facebook.com/michaelgonzalez2012 Michael Gonzalez

    If you want to learn more about CUDA, Nvidia has given us this free online course
    Thanks again Nvidia :)

    https://www.udacity.com/course/cs344

  • Mahesh Doijade

    very informative article.. good of beginners in CUDA
    this is also a nice post on CUDA http://www.techdarting.com/2013/06/cuda.html