多くのレジスタを使用し、それらをローカルメモリに大量に流出させるカーネルがあります。
4688 bytes stack frame, 4688 bytes spill stores, 11068 bytes spill loads
ptxas info : Used 255 registers, 348 bytes cmem[0], 56 bytes cmem[2]
こぼれが非常に多いように見えるので、L1 または L2 キャッシュさえも通過すると思います。ローカル メモリは各スレッド専用なので、ローカル メモリへのアクセスはコンパイラによってどのように結合されるのでしょうか? このメモリは、グローバル メモリのように 128 バイトのトランザクションで読み取られますか? この量の流出により、メモリ帯域幅の使用率が低くなります (50%)。ピークメモリ帯域幅の最大 80% を取得する流出のない同様のカーネルがあります。
EDITnvprof
ツールを使用して、さらにいくつかのメトリックを抽出しました。ここで説明した手法をよく理解している場合、レジスタのスピル (4 * l1 ヒットとミス / L2 = の 4 セクタにわたるすべての書き込みの合計) により、かなりの量のメモリ トラフィックが発生します(4 * (45936 + 4278911)) / (5425005 + 5430832 + 5442361 + 5429185) = 79.6%
。私がここにいるかどうか誰か確認してくれませんか?
Invocations Event Name Min Max Avg
Device "Tesla K40c (0)"
Kernel: mulgg(double const *, double*, int, int, int)
30 l2_subp0_total_read_sector_queries 5419871 5429821 5425005
30 l2_subp1_total_read_sector_queries 5426715 5435344 5430832
30 l2_subp2_total_read_sector_queries 5438339 5446012 5442361
30 l2_subp3_total_read_sector_queries 5425556 5434009 5429185
30 l2_subp0_total_write_sector_queries 2748989 2749159 2749093
30 l2_subp1_total_write_sector_queries 2748424 2748562 2748487
30 l2_subp2_total_write_sector_queries 2750131 2750287 2750205
30 l2_subp3_total_write_sector_queries 2749187 2749389 2749278
30 l1_local_load_hit 45718 46097 45936
30 l1_local_load_miss 4278748 4279071 4278911
30 l1_local_store_hit 0 1 0
30 l1_local_store_miss 1830664 1830664 1830664
編集
私が考えていたビット トランザクションではなく、128 バイトであることに気付きました。