0Pricing
CUDA Academy · Lesson

Decoding cudaGetErrorString

Turning codes into readable messages.

Codes Are Not Friendly

A raw cudaError_t is just a number. To understand it, you translate it into plain English with cudaGetErrorString. 📖

What It Returns

cudaGetErrorString takes an error code and returns a human-readable C string describing exactly what went wrong.

const char* msg = cudaGetErrorString(e);

All lessons in this course

  1. Return Codes vs Async Errors
  2. cudaGetLastError After Launch
  3. A Reusable CUDA_CHECK Macro
  4. Decoding cudaGetErrorString
← Back to CUDA Academy