NVIDIA GPU Optimisation Tool CUDA Memcheck

From RidgeRun Developer Wiki



Previous: Optimisation Workflow/Tools Index Next: Tools/ CUDA Profiler






CUDA Memcheck

For debugging most of the issues, you can use cudamemcheck. You can refer to the CUDA-MEMCHECK NVIDIA documentation. The tool allows the developer to identify:

  • memory access errors and memory leaks (memcheck)
  • shared memory data access hazards (racecheck): remember that shared memory is "multi-threaded"
  • uninitialised device global memory access (initcheck)
  • thread synchronisation hazards (synccheck)

The usage is pretty simple:

cuda-memcheck [memcheck_options] app_name [app_options]

where some of the memcheck_options are:

  • --show-backtrace
  • --track-unused-memory
  • --tool: memcheck (default), racecheck, initcheck, synccheck
  • --report-api-errors
  • --check-api-memory-access
  • --print-level
  • --save

It is better to read them from --help option.

So, what are they for in our optimisation?

Simple: it is better to have identified issues previously you touch the code. Thus, you won't doubt yourself.


Previous: Optimisation Workflow/Tools Index Next: Tools/ CUDA Profiler