Return Codes vs Async Errors
Why kernels fail silently by default.
Two Ways CUDA Fails
CUDA reports trouble in two flavors: an immediate return code from API calls, and delayed async errors from kernels. Knowing both is key. 🧭
API Calls Return a Code
Most CUDA runtime calls hand back a cudaError_t. A value of cudaSuccess means all good; anything else signals a problem you can act on.
cudaError_t err = cudaMalloc(&d, n);All lessons in this course
- Return Codes vs Async Errors
- cudaGetLastError After Launch
- A Reusable CUDA_CHECK Macro
- Decoding cudaGetErrorString