@@ -278,37 +278,16 @@ https://zhuanlan.zhihu.com/p/346910129
278
278
279
279
### 常用命令
280
280
281
- ``` bash
282
- //代码简单时,编译器会进行优化
283
- nvprof --metrics branch_efficiency
284
-
285
- // 每个SM在每个cycle能够达到的最大active warp数目占总warp的比例
286
- nvprof --metrics achieved_occupancy
287
-
288
- //带宽 全局内存加载事务数
289
- nvprof --metrics gld_throughput
290
-
291
- //带宽比值
292
- nvprof --metrics gld_efficiency
293
-
294
-
295
- nvprof --metrics gst_efficiency
296
-
297
- //每个warp上执行的指令数目的平均值
298
- nvprof --metrics inst_per_warp
299
-
300
- //同一个thread中如果能有更多的独立的load/store操作
301
- nvprof --metrics dram_read_throughput
302
281
282
+ ``` bash
283
+ // https://zhuanlan.zhihu.com/p/666242337#:~ :text=%E7%9B%AE%E5%89%8D%E4%B8%BB%E6%B5%81%E7%9A%84%20CU
303
284
304
- //用来验证由于__syncthreads导致更少的warp
305
- nvprof --metrics stall_sync
285
+ // 代码简单时,编译器会进行优化 原 branch_efficiency
286
+ ncu --metrics smsp__sass_average_branch_targets_threads_uniform.pct
306
287
307
- //图表
308
- nvvp
309
288
310
- //设备 主机 调用情况
311
- nvprof
289
+ // 用来验证由于__syncthreads导致更少的warp, 原 stall_sync
290
+ ncu --metrics smsp__warp_issue_stalled_barrier_per_warp_active.pct + smsp__warp_issue_stalled_membar_per_warp_active.pct
312
291
313
292
//
314
293
nvprof --devices 0 --metrics gld_efficiency
@@ -323,6 +302,26 @@ ncu --metrics
323
302
324
303
//生成ncu-rep 文件
325
304
ncu --set full -f -o 09 ./09
305
+
306
+ // 每个SM在每个cycle能够达到的最大active warp数目占总warp的比例 ,原 achieved_occupancy
307
+ ncu --metrics sm__warps_active.avg.pct_of_peak_sustained_active
308
+
309
+ // 带宽 全局内存加载事务数,原 gld_throughput
310
+ ncu --metrics l1tex__t_bytes_pipe_lsu_mem_global_op_ld.sum.per_second
311
+
312
+ // 带宽比值 原 gld_efficiency
313
+ ncu --metrics smsp__sass_average_data_bytes_per_sector_mem_global_op_ld.pct
314
+
315
+ // 原 gst_efficiency
316
+ ncu --metrics smsp__sass_average_data_bytes_per_sector_mem_global_op_st.pct
317
+
318
+ // 每个warp上执行的指令数目的平均值, 原 inst_per_warp
319
+ ncu --metrics smsp__average_inst_executed_per_warp.ratio
320
+
321
+ // 同一个thread中如果能有更多的独立的load/store操作, 原 dram_read_throughput
322
+ ncu --metrics dram__bytes_read.sum.per_second
323
+
324
+
326
325
```
327
326
328
327
### 理论
0 commit comments