nvprof的使用:
首先保证使用nvcc编译器将源程序编译为可执行程序
接着执行命令:nvprof ./executablePro
profiling result中显示的是kernel执行的time情况
api calls则显示的是程序调用的api所耗费的time情况
一般对kernel进行分析时,看profiling result中的结果。
此外,还可以测试程序的其他性能参数:
achieved_occupancy参数:每个sm在每个cycle能够达到的最大activewarp 占总warp的比例。
nvprof --metrics achieved_occupancy ./executablePro
gld_throughput: global load throughput (查看memory 的throughput)
nvprof --metrics gld_throughput ./executablePro
gld_efficiency: global memory loadefficiency: device memory bandwidth的使用率
nvprof –metrics gld_efficiency ./ executablePro