我有以下问题。我想使用gst_efficiency来测量我的cuda应用程序的gld_efficiency和nvprof。随cuda 5.0分发的文档告诉我使用以下公式为具有计算能力2.03.0的设备生成这些文档:
gld_efficiency = 100 * gld_requested_throughput / gld_throughput
gst_efficiency = 100 * gst_requested_throughput / gst_throughput对于所需的指标,给出了以下公式:
gld_throughput = ((128 * global_load_hit) + (l2_subp0_read_requests + l2_subp1_read_requests) * 32 - (l1_local_ld_miss * 128)) / gputime
gst_throughput = (l2_subp0_write_requests + l2_subp1_write_requests) * 32 - (l1_local_ld_miss * 128)) / gputime
gld_requested_throughput = (gld_inst_8bit + 2 * gld_inst_16bit + 4 * gld_inst_32bit + 8
* gld_inst_64bit + 16 * gld_inst_128bit) / gputime
gst_requested_throughput = (gst_inst_8bit + 2 * gst_inst_16bit + 4 * gst_inst_32bit + 8
* gst_inst_64bit + 16 * gst_inst_128bit) / gputime由于没有给出所使用的度量的公式,我假设这些事件可以由nvprof计算。但有些事件似乎不能在我的gtx 460 (也尝试了gtx 560 Ti)。我粘贴了输出 of nvprof --query-events。
有什么想法吗?是哪里出了问题还是我误解了什么?
编辑:我不想使用CUDA Visual,因为我试图分析我的应用程序的不同参数。因此,我希望使用多个参数配置运行nvprof,记录多个事件(每个事件在其一次运行中),然后输出表中的数据。我已经实现了这一自动化,并为其他指标(即发布的指令)工作,并希望这样做是为了负载和存储效率。这就是为什么我对涉及nvvp的解决方案不感兴趣的原因。顺便说一句,对于我的应用程序,nvvp无法计算存储效率所需的指标,因此在这种情况下对我的应用毫无帮助。
发布于 2013-05-01 17:07:52
我很高兴有人有同样的问题:)我试图做同样的事情,不能使用Visual,因为我想像6000种不同的内核。
NVidia站点上的公式文档很少--实际上,变量可以是:
( a)活动
( b)其他计量
c)依赖于GPU的不同变量
然而,那里的许多度量标准中要么有排版,要么在nvprof中使用的版本与站点上的版本略有不同。此外,变量没有标记,所以您不能仅仅通过查看它们是a)、b)还是c)来判断它们。我用脚本实现了grep,然后不得不手工修复它。以下是我的发现:
( 1)“L1_local/global_ld/st_hit/想念”--它们在nvprof中有"load"/"store“,而不是"ld"/"st”。
2) "l2_ ...whatever. _requests“--它们在nvprof中有"sector_queries”,而不是"requests“。
3)“load/store_hit/hit”这些分析器中还有"l1_“--”L1_local/全局_load/store_hit/hit“
4) "tex0_cache_misses“在分析器中有”扇区“-- "tex0_cache_sector_misses”
5) "tex_cache_sector_queries“在nvprof中缺少"0”-所以"tex0_cache_sector_queries“。
最后,变量:
1) "#SM“流多处理器的数量。通过cudaDeviceProp到达。
2) "gputime“显然是GPU上的执行时间。
3) "warp_size“是指您的GPU上翘曲的大小,再一次通过cudaDeviceProp获得。
4) "max_warps_per_sm“在sm * #SM *每块翘曲上可执行的块数。我想是的。
5) "elapsed_cycles“发现了这一点:https://devtalk.nvidia.com/default/topic/518827/computeprof-34-active-cycles-34-counter-34-active-cycles-34-value-doesn-39-t-make-sense-to-/,但仍然不能完全确定我是否理解它。
希望这能帮助你和其他遇到同样问题的人:)
https://stackoverflow.com/questions/15581265
复制相似问题