GPU Accelerated Computing with C and C++

Getting Started with CUDA C/C++

Using the CUDA Toolkit you can accelerate your C or C++ applications by updating the computationally intensive portions of your code to run on GPUs. To accelerate your applications, you can call functions from drop-in libraries as well as develop custom applications using languages including C, C++, Fortran and Python. Below you will find some resources to help you get started using CUDA.

1
SETUP CUDA

Install the free CUDA Tookit on a Linux, Mac or Windows system with one or more CUDA-capable GPUs. Follow the instructions in the installation guides to get up and running quickly.

If you do not have a GPU, you can access one of the thousands of GPUs available from cloud service providers including Amazon AWS, Microsoft Azure and IBM SoftLayer. The NVIDIA-maintained CUDA Amazon Machine Image (AMI) on AWS, for example, comes pre-installed with CUDA and is available for use today.

2
YOUR FIRST CUDA PROGRAM

You are now ready to write your first CUDA program. The article, Even Easier Introduction to CUDA, introduces key concepts through simple examples that you can follow along.

The video below walks through an example of how to write an example that adds two vectors.

The Programming Guide in the CUDA Documentation introduces key concepts covered in the video including CUDA programming model, important APIs and performance guidelines.

NVIDIA also provides hands-on training through a collection of self-paced labs. The labs guide you step-by-step through editing and execution of code, and even interaction with visual tools is all woven together into a simple immersive experience.

3
PRACTICE CUDA

Practice the techniques you learned in the materials above through more hands-on labs created for intermediate and advanced users.

The CUDA C Best Practices Guide presents established parallelization and optimization techniques and explains programming approaches that can greatly simplify programming GPU-accelerated applications.

For a more formal, instructor-led introduction to CUDA, explore the Introduction to Parallel Programming on UDACITY. The course covers a series of image processing algorithms such as you might find in Photoshop or Instagram. You'll be able to program and run your assignments on high-end GPUs, even if you don't have one yourself.

Additional Resources

CODE Samples

Availability

The CUDA Toolkit is a free download from NVIDIA and is supported on Windows, Mac, and most standard Linux distributions.

So, now you’re ready to deploy your application?
Register today for free access to NVIDIA TESLA GPUs in the cloud.

Latest News

Modeling Cities in 3D Using Only Image Data

ETH Zurich scientists leveraged deep learning to automatically stich together millions of public images and video into a three-dimensional, living model of the city of Zurich.

Developer Voices

We love seeing all of the NVIDIA GPU-related tweets – here’s some that we came across this week: Thank you @nvidia, #GTC17 was amazing. I learned a lot about GPUs and #deeplearning and their applications and met so many great people!

Easily Colorize Black and White Photos with AI

Researchers from University of California, Berkeley developed an interactive deep learning-based app that makes it easy to accurately colorize a black and white image in minutes.

Create a 3D Caricature in Minutes with Deep Learning

Researchers from The University of Hong Kong developed a deep learning-based sketching system that lets users easily create a 3D face in minutes.

Blogs: Parallel ForAll

Explaining How End-to-End Deep Learning Steers a Self-Driving Car

As part of a complete software stack for autonomous driving, NVIDIA has created a deep-learning-based system, known as PilotNet, which learns to emulate the behavior of human drivers and can be deployed as a self-driving car controller.

CUDA 9 Features Revealed: Volta, Cooperative Groups and More

Today at the GPU Technology Conference NVIDIA announced CUDA 9, the latest version of CUDA’s powerful parallel computing platform and programming model. In this post I’ll provide an overview of the awesome new features of CUDA 9.

Inside Volta: The World’s Most Advanced Data Center GPU

PCToday at the 2017 GPU Technology Conference in San Jose, NVIDIA CEO Jen-Hsun Huang announced the new NVIDIA Tesla V100, the most advanced accelerator ever built.

Photo Editing with Generative Adversarial Networks (Part 2)

In part 1 of this series I introduced Generative Adversarial Networks (GANs) and showed how to generate images of handwritten digits using a GAN.