【发布时间】:2018-07-11 15:14:13
【问题描述】:
使用 nvprof 分析 CUDA 程序。
我已经在How to collect the event value every time the kernel function been invocated?描述了这个问题
我再次发布问题。
与nvprof --events tex0_cache_sector_queries --replay-mode kernel ./matrixMul,
或nvprof --events tex0_cache_sector_queries --replay-mode application ./matrixMul,
我们可以收集事件值结果:
==40013== Profiling application: ./matrixMul
==40013== Profiling result:
==40013== Event result:
"Device","Kernel","Invocations","Event Name","Min","Max","Avg","Total"
"Tesla K80 (0)","void matrixMulCUDA<int=32>(float*, float*, float*, int, int)",301,"tex0_cache_sector_queries",0,30,24,7224
上面的结果是一个摘要。核函数matrixMulCUDA调用tex0_cache_sector_queries的301次调用值。它只有 301 次调用的 min, max, avg, total 值,即汇总结果。
我想从每次调用 matrixMulCUDA 时收集完整的 301 次 tex0_cache_sector_queries 值。另一方面,每次调用内核函数 matrixMulCUDA 时,我都想收集 tex0_cache_sector_queries 事件值。如何收集?
【问题讨论】: