-
Book Overview & Buying
-
Table Of Contents
Deep Learning with C++
By :
This chapter introduced CUDA as NVIDIA’s parallel model for running massive numbers of lightweight threads on a GPU, contrasted it with CPU-only execution, and showed when each wins. You set up a working environment (driver + CUDA Toolkit), verified it (with nvidia-smi, nvcc --version, and sample runs), and saw quick paths in Colab with nvcc4jupyter. We established a CPU baseline (through an array-add kernel), then ported it to CUDA: writing a kernel, choosing a launch configuration (<<<grid, block>>>), and mapping iterations to threads with per-thread indices and grid-stride loops. You learned about the CUDA execution hierarchy (threads | blocks | grid) and memory scopes (thread-local, shared, global), why block sizes should be multiples of 32 (warps), and how to scale from one block to many for full SM utilization. We profiled runs with nvprof (and noted Nsight Systems/Compute for deeper analysis), interpreted Unified Memory page faults, and identified...