Chapter 6, Debugging and Profiling Your CUDA Code

  1. Memory allocations are automatically synchronized in CUDA.
  2. The lockstep property only holds in single blocks of size 32 or less. Here, the two blocks would properly diverge without any lockstep.
  3. The same thing would happen here. This 64-thread block would actually be split into two 32-thread warps.
  4. Nvprof can time individual kernel launches, GPU utilization, and stream usage; any host-side profiler would only see CUDA host functions being launched.
  5. Printf is generally easier to use for small-scale projects with relatively short, inline kernels. If you write a very involved CUDA kernel with thousands of lines, then probably you would want to use the IDE to step through and debug your kernel line by line.
  6. This tells CUDA which GPU we want to use.
  7. cudaDeviceSynchronize will ensure that interdependent kernel launches and mem copies are indeed synchronized, and that they won't launch before all necessary operations have finished.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.50.222