Hello GPU: Your First .cu File
Build and run a minimal CUDA program.
Your First .cu File
Time to build something real. A CUDA program lives in a .cu file, which can hold both CPU and GPU code side by side. 🎉
Include the Header
Most CUDA samples start by pulling in standard headers. The CUDA runtime header is included automatically by nvcc, so iostream is often enough.
#include <cstdio>All lessons in this course
- Driver, Runtime, and Toolkit Versions
- Reading nvidia-smi Like a Pro
- Compiling with nvcc
- Hello GPU: Your First .cu File