Debugging and Profiling Compute Kernels
摘要
As GPU programming becomes increasingly popular, there is a greater need for tools to help debug and profile GPU code. Elegant tools for profiling and debugging GPU code are crucial for ensuring developer productivity and code quality. In this chapter, we look at two such tools, cuda-gdb and NVIDIA Nsight Compute. We begin by introducing cuda-gdb, which is a GDB extension developed by NVIDIA for interactively debugging CUDA code. The cuda-gdb tool may feel familiar to those who have used GDB, introduced in Chapter 30 . The second tool is NVIDIA Nsight Compute, which is the replacement for the deprecated nvprof tool. The NVIDA Volta architecture is the final one supported for nvprof. Future GPUarchitectures are to be centered around NVIDIA Nsight Compute for profiling CUDA code.