Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is CUDA like? What is it for? What are the benefits? And how to start?

Tags:

cuda

gpu

nvidia

I am interested in developing under some new technology and I was thinking in trying out CUDA. Now... their documentation is too technical and doesn't provide the answers I'm looking for. Also, I'd like to hear those answers from people that've had some experience with CUDA already.

Basically my questions are those in the title:

What exactly IS CUDA? (is it a framework? Or an API? What?)

What is it for? (is there something more than just programming to the GPU?)

What is it like?

What are the benefits of programming against CUDA instead of programming to the CPU?

What is a good place to start programming with CUDA?

like image 468
PedroC88 Avatar asked Mar 06 '11 16:03

PedroC88


People also ask

What is CUDA useful for?

CUDA® is a parallel computing platform and programming model that enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU).

What is CUDA and how does it work?

CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach called general-purpose computing on GPUs (GPGPU).

How do I get started with CUDA programming?

To get started programming with CUDA, download and install the CUDA Toolkit and developer driver. The toolkit includes nvcc , the NVIDIA CUDA Compiler, and other software necessary to develop CUDA applications. The driver ensures that GPU programs run correctly on CUDA-capable hardware, which you'll also need.

What is CUDA in detail?

CUDA is a parallel computing platform and programming model created by NVIDIA. With more than 20 million downloads to date, CUDA helps developers speed up their applications by harnessing the power of GPU accelerators.


1 Answers

CUDA brings together several things:

  • Massively parallel hardware designed to run generic (non-graphic) code, with appropriate drivers for doing so.
  • A programming language based on C for programming said hardware, and an assembly language that other programming languages can use as a target.
  • A software development kit that includes libraries, various debugging, profiling and compiling tools, and bindings that let CPU-side programming languages invoke GPU-side code.

The point of CUDA is to write code that can run on compatible massively parallel SIMD architectures: this includes several GPU types as well as non-GPU hardware such as nVidia Tesla. Massively parallel hardware can run a significantly larger number of operations per second than the CPU, at a fairly similar financial cost, yielding performance improvements of 50× or more in situations that allow it.

One of the benefits of CUDA over the earlier methods is that a general-purpose language is available, instead of having to use pixel and vertex shaders to emulate general-purpose computers. That language is based on C with a few additional keywords and concepts, which makes it fairly easy for non-GPU programmers to pick up.

It's also a sign that nVidia is willing to support general-purpose parallelization on their hardware: it now sounds less like "hacking around with the GPU" and more like "using a vendor-supported technology", and that makes its adoption easier in presence of non-technical stakeholders.

To start using CUDA, download the SDK, read the manual (seriously, it's not that complicated if you already know C) and buy CUDA-compatible hardware (you can use the emulator at first, but performance being the ultimate point of this, it's better if you can actually try your code out)

like image 122
Victor Nicollet Avatar answered Nov 11 '22 19:11

Victor Nicollet