Python is one of the most popular programming languages today for science, engineering, data analytics and deep learning applications. However, as an interpreted language, it has been considered too slow for high-performance computing. That has changed with CUDA Python from Continuum Analytics.

With CUDA Python, using the Numba Python compiler, you get the best of both worlds: rapid iterative development with Python combined with the speed of a compiled language targeting both CPUs and NVIDIA GPUs.

1
SETUP CUDA PYTHON

To run CUDA Python, you will need the CUDA Toolkit installed on a system with CUDA capable GPUs.

If you do not have a CUDA-capable 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.

Use this guide for easy steps to install CUDA. To setup CUDA Python, first install the Anaconda python distribution. Then install the latest version of the Numba package. You can find detailed installation instructions in the Numba documentation.

Or, watch the short video below and follow along.

2
YOUR FIRST CUDA PYTHON PROGRAM

You are now ready for your first python program on the GPU. The video below walks through a simple example that adds two vectors for you to follow along.

If you are new to Python, explore the beginner section of the Python website for some excellent getting started resources. The blog, An Even Easier Introduction to CUDA, introduces key CUDA concepts through simple examples.

In the Numba documentation you will find information about how to vectorize functions to accelerate them automatically as well as how to write CUDA code in Python. Download and execute Jupyter Notebooks for the Mandelbrot and Monte Carlo Option Pricer examples on your local machine.

3
PRACTICE

Check out Numbas github repository for additional examples to practice.

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. Practice the techniques you learned in the materials above through hands-on labs.

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.

Availability

The Numba package is available as a Continuum Analytics sponsored open-source project.

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

So, now youre ready to deploy your application?

Register today for free access to NVIDIA TESLA GPUs in the cloud.

Latest News

Visualizing Star Polymers in Record Time

In the last five minutes, you have probably come into contact with more polymers than you can count. In fact, they are everywhere; in grocery bags,  water bottles, phones, computers, food packaging, auto parts, tires, airplanes, and toys.

Using MATLAB and TensorRT on NVIDIA GPUs

MathWorks recently released MATLAB R2018b which integrates with NVIDIA TensorRT through GPU Coder. With this integration, scientists and engineers can achieve faster inference performance on GPUs from within MATLAB.

PyTorch 1.0 Accelerated On NVIDIA GPUs

Facebook announced availability of PyTorch 1.0 preview release today at the PyTorch Developer Conference, an event for PyTorch Developer Community. PyTorch is one of the most widely used deep learning frameworks by researchers and developers.

NVIDIA Turing SDKs Now Available

NVIDIA’s Turing architecture is one of the biggest leaps in computer graphics in 20 years. Here’s a look at the latest developer software releases to take advantage of this cutting-edge GPU.

Blogs: Parallel ForAll

VRWorks 360 Video SDK 2.0 Adds Features, Turing Support

An ecosystem of camera systems and video processing applications surround us today for professional and consumer use, be it, for film or home video.

RAPIDS Accelerates Data Science End-to-End

Today’s data science problems demand a dramatic increase in the scale of data as well as the computational power required to process it.

Introduction to Real-Time Ray Tracing with Vulkan

NVIDIA’s new Turing GPU unleashed real-time ray-tracing in a consumer GPU for the first time. Since then, much virtual ink has been spilled discussing ray tracing in DirectX 12.

Mixed Precision Training for NLP and Speech Recognition with OpenSeq2Seq

The success of neural networks thus far has been built on bigger datasets, better theoretical models, and reduced training time. Sequential models, in particular, could stand to benefit from even more from these.