When compiling an NVIDIA CUDA program for debugging, it is necessary to pass the -g -G options to the nvcc compiler driver. These options disable most compiler optimization and include symbolic debugging information in the driver executable file, making it possible to debug the application. For example, to compile the sample CUDA program named tx_cuda_matmul.cu for debugging, use the following commands to compile and execute the application:
Rogue Wave Software, Inc. |
Voice: (303) 473-9118 |
rwonlinedocs@roguewave.com |