Write your first GPU kernel and understand the CUDA execution model: thread indexing, kernel launch syntax, and GPU/CPU synchronization.
// TUTORIAL
GPU execution__global__ function is a CUDA kernel — code that runs on the GPU, not the CPU.<<<blocks, threads>>>:<<<1, 1>>> = 1 block, 1 threadcudaDeviceSynchronize() before exiting.printf("Hello from the GPU!\n") call inside helloKernel.printf works inside GPU kernels (CUDA 2.0+).// expected output
Hello from the GPU!
// YOUR PROGRESS
Log in to save progress
// DETAILS
// MORE IN PARALLELISM
// LEARN THE THEORY
Parallelism concepts