When using Nsight
to develop CUDA
program, you can use profile
function to profile the program:
You can also toggle the C/C++
and profile
view in the right corner:
BTW, if you only want to profile a part of the program (not the whole), you can usecudaProfilerStart()
and cudaProfilerStop
to surround the code, then untick “Start execution with profiling enabled
” in “Profile Configuration
“: