Tag: CUDA

  • CUDA: Hello World Kernel

    by

    in

    Our first CUDA kernel helps connect CPU and GPU programming. It runs a simple function using many parallel threads. This is different from normal “Hello World” programs because it shows true parallelism, where hundreds or thousands of threads work at the same time. To understand how this works, you need to know some basics: These…

  • CUDA Programming Model

    by

    in

    The CUDA programming model splits work between two parts: the CPU (host) and the GPU (device). The CPU controls what happens in the program and sends tasks called kernels to the GPU for processing. To write good CUDA programs, you need to understand how these two parts work together and how tasks are organized into…

  • CUDA : Introduction

    by

    in

    CUDA (Compute Unified Device Architecture) is NVIDIA’s parallel computing platform that allows scientists and engineers to use GPUs for general-purpose computing. GPUs were built to handle graphics, but CUDA helps them do other types of work too. With CUDA, thousands of cores in a GPU can be used for things like scientific simulations and data…

  • Nvidia Nsight Systems : Profiling for CUDA code

    In this post we will look at steps involved in profiling of the CUDA code using Nvidia Nsight Systems. Let’s take a simple code which performs some array operations. To compile this code, we can use following command. Please note that I am using “-arch=sm_86” which instructs compiler to generate code for compute capability 8.6…

  • CUDA “Hello World!” : Array addition using single block

    by

    in

    In this post, we are going to look at basic CUDA code. Even though it doesn’t necessarily prints “Hello World!”, being a very simple arithmetic operation, we will treat it as a “Hello World!” code for CUDA. As we are aware that the discrete GPU cards have their own memory, in CUDA we need to…