当我运行分析器对我的代码,输出的部分是:CUDA异形占用率非常低;如何诊断?
Limiting Factor
Achieved Occupancy: 0.02 (Theoretical Occupancy: 0.67)
IPC: 1.00 (Maximum IPC: 4)
达到0.02占用似乎可怕低。这可能是由于配置文件运行时丢失了.csv文件吗?它抱怨:
Program run #18 completed.
Read profiler output file for context #0, run #1, Number of rows=6
Error : Error in profiler data file '/.../temp_compute_profiler_1_0.csv' at line number 1. No column found
Error in reading profiler output:
Application : "/.../bin/python".
Profiler data file '/.../temp_compute_profiler_2_0.csv' for application run 2 not found.
Read profiler output file for context #0, run #4, Number of rows=6
我的块是32 * 4 * 1,网格为25 * 100,并且测试已经显示32个寄存器提供最佳性能(即使在溢出的结果)。
如果0.02号码是正确的,我怎么能去调试这是怎么回事?我已经尝试过移动可能的候选人,以共享和/或常量内存,与launch_bounds实验,数据移动到纹理等
编辑:如果从运行配置文件更多的数据会有所帮助,只是让我知道我可以提供它。谢谢阅读。
编辑2:请求的数据。
IPC: 1.00
Maximum IPC: 4
Divergent branches(%): 6.44
Control flow divergence(%): 96.88
Replayed Instructions(%): -0.00
Global memory replay(%): 10.27
Local memory replays(%): 5.45
Shared bank conflict replay(%): 0.00
Shared memory bank conflict per shared memory instruction(%): 0.00
L1 cache read throughput(GB/s): 197.17
L1 cache global hit ratio (%): 51.23
Texture cache memory throughput(GB/s): 0.00
Texture cache hit rate(%): 0.00
L2 cache texture memory read throughput(GB/s): 0.00
L2 cache global memory read throughput(GB/s): 9.80
L2 cache global memory write throughput(GB/s): 6.80
L2 cache global memory throughput(GB/s): 16.60
Local memory bus traffic(%): 206.07
Peak global memory throughput(GB/s): 128.26
The following derived statistic(s) cannot be computed as required counters are not available:
Kernel requested global memory read throughput(GB/s)
Kernel requested global memory write throughput(GB/s)
Global memory excess load(%)
Global memory excess store(%)
Achieved global memory read throughput(GB/s)
Achieved global memory write throughput(GB/s)
解决方案(S):
缺少数据是由于过低的超时值问题;某些数据的早期运行将超时并且数据不会被写入(并且这些错误消息将在稍后运行的垃圾邮件中丢失)。
达到0.02的占用率是由于达到maxint(2 ** 32-1)的active_warps
和active_cycles
(以及潜在的其他值)造成的。减少分析脚本输入的大小会导致更多理智的值出现(包括更好/更实际的IPC和分支统计信息)。
看看读/写数据花了多少时间,以及一些内核代码来看看发生了什么会很有趣。不知道丢失的csv文件,如果他们可能是一个问题。编辑:分析器的其他有趣的输出将是分支分支和未合并和合并内存读取/写入。 – martiert 2012-02-23 08:33:21
这是您要查找的数据吗?这些价值对我来说似乎不合理;当然不喜欢0.02占用的东西。 – 2012-02-23 09:53:56
为了使全局读写吞吐量的计数器不可用,有点奇怪,但会有所帮助。你可以给一些内核代码吗?我不知道你的内核是干什么的,或者它涉及多少工作。我认为你没有太多的数据,所以如果算法不涉及很多工作,对GPU来说可能会很少。 – martiert 2012-02-23 10:08:32