コンピューティング機能 3.5 の CUDA カードで L2 キャッシュのプロファイリングに問題があります。Kepler (3.x) では、グローバル メモリからのロードは L2 にのみキャッシュされ、L1 にはキャッシュされません。私の質問は、nvprof (コマンドライン プロファイラー) を使用して、グローバル ロードが L2 キャッシュで達成するヒット率を見つける方法です。収集できるすべてのメトリックを照会しましたが、L2 痛に関連するメトリックは次のとおりです。
l2_l1_read_hit_rate: Hit rate at L2 cache for all read requests from L1 cache
l2_texture_read_hit_rate: Hit rate at L2 cache for all read requests from texture cache
l2_l1_read_throughput: Memory read throughput seen at L2 cache for read requests from L1 cache
l2_texture_read_throughput: Memory read throughput seen at L2 cache for read requests from the texture cache
l2_read_transactions: Memory read transactions seen at L2 cache for all read requests
l2_write_transactions: Memory write transactions seen at L2 cache for all write requests
l2_read_throughput: Memory read throughput seen at L2 cache for all read requests
l2_write_throughput: Memory write throughput seen at L2 cache for all write requests
l2_utilization: The utilization level of the L2 cache relative to the peak utilization
私が得た唯一のヒット率は、L1 からの読み取りの場合です。しかし、グローバル メモリへの読み取りは、L1 にキャッシュされていないため、L1 から取得されることはありません。それとも私はここで間違っていますか?それはまさに私が望むメトリックですか?
驚くべきことに (またはそうではない)、グローバル メモリ読み取りの L1 ヒット率を示すメトリックがあります。
l1_cache_global_hit_rate: Hit rate in L1 cache for global loads
これはケプラーにとって非ゼロになることがありますか?
乾杯!