FAQ & 已知问题

更新时间:
复制为 MD 格式

FAQ

1. 减少测试环境差异

使用acu进行性能分析时,为了多次采集之间的测试环境差异,可通过设置设备为独占模式,禁止其他程序在acu采样过程中运行。

# 设置设备为独占模式
ppu-smi -c EXCLUSIVE_PROCESS

# 恢复设备为默认模式
ppu-smi -c DEFAULT

可通过锁定设备频率,减少设备调频对acu采样的影响:

# 锁定设备频率到1.5GHz
ppu-smi -lpc 1500

# 解除频率锁定
ppu-smi -rpc

2. 目标应用已经结束,但acu没有收到目标应用退出消息而卡死

有些目标应用程序在启动后,会fork出很多的子进程。在目标程序主进程退出后,还有子进程一直存在不退出,acu此时就会一直等待子进程,看到的现象会误以为acu卡死。

确认此场景方法:

  1. 安装pstree工具。

  2. acu出现卡死现象后,在另一个终端中输入命令:pstree <acu_pid>,确认是否有目标应用fork出的进程出现在了此命令的列表中。如果有就说明有fork出的子进程不退出。

规避方法:

acu命令中使用--wait primary参数,让acu仅等待目标应用的主进程退出。

3. 无法采集PPU性能数据

PPU性能数据采集资源可能由于被其他应用占用,导致acu运行失败,可能由于如下原因导致acu无法采集设备运行指标数据:

  • 其他acu应用正在采集跟踪数据。

  • 其他asys应用正在采集设备运行指标数据。

  • DCGM正在采集性能分析指标,可通过执行dcgmi profile --pause暂停DCGM采集。

已知问题

  • PPU SDK v1.2.0:acu采集包含订阅hgpti的应用程序时可能崩溃。

  • 不支持单独采集HGGC graphkernel node的性能数据, 但可以通过--graph-profiling graph采集整个graph的性能数据。

  • 不支持采集使用hggcLaunchCooperativeKernelMultiDevice的应用程序。

  • acu -o选项指定报告输出位置的文件IO读写速率很低时,acu报告文件可能生成不完整。

  • --profile-from-start不支持跨进程控制采集时间范围。

  • 应用程序编译需包含-pthread选项,否则可能导致acu运行崩溃。

  • acu采集过程中被打断,已采集的跟踪信息可能无法正确展示。

  • Warp State StatisticsAvg. Active Threads Per Warp [inst]值会偏低。

  • Range Replay模式下,capturereplay memory相关API(详细列表)如下还不稳定,可能影响数据的准确性。

    # HGGC runtime API
    hggcMemcpy2D,
    hggcMemcpy2DArrayToArray,
    hggcMemcpy2DArrayToArray_ptds,
    hggcMemcpy2DAsync,
    hggcMemcpy2DAsync_ptsz,
    hggcMemcpy2DFromArray,
    hggcMemcpy2DFromArrayAsync,
    hggcMemcpy2DFromArrayAsync_ptsz,
    hggcMemcpy2DFromArray_ptds,
    hggcMemcpy2DToArray,
    hggcMemcpy2DToArrayAsync,
    hggcMemcpy2DToArrayAsync_ptsz,
    hggcMemcpy2DToArray_ptds,
    hggcMemcpy2D_ptds,
    hggcMemcpy3D,
    hggcMemcpy3DAsync,
    hggcMemcpy3DAsync_ptsz,
    hggcMemcpy3DPeer,
    hggcMemcpy3DPeerAsync,
    hggcMemcpy3DPeerAsync_ptsz,
    hggcMemcpy3DPeer_ptds,
    hggcMemcpy3D_ptds,
    hggcMemcpyArrayToArray,
    hggcMemcpyArrayToArray_ptds,
    hggcMemcpyAsync,
    hggcMemcpyAsync_ptsz,
    hggcMemcpyFromArray,
    hggcMemcpyFromArrayAsync,
    hggcMemcpyFromArrayAsync_ptsz,
    hggcMemcpyFromArray_ptds,
    hggcMemcpyFromSymbol,
    hggcMemcpyFromSymbolAsync,
    hggcMemcpyFromSymbolAsync_ptsz,
    hggcMemcpyFromSymbol_ptds,
    hggcMemcpyPeer,
    hggcMemcpyPeerAsync,
    hggcMemcpyToArray,
    hggcMemcpyToArrayAsync,
    hggcMemcpyToArrayAsync_ptsz,
    hggcMemcpyToArray_ptds,
    hggcMemcpyToSymbol,
    hggcMemcpyToSymbolAsync,
    hggcMemcpyToSymbolAsync_ptsz,
    hggcMemcpyToSymbol_ptds,
    hggcMemcpy_ptds,
    hggcMemset,
    hggcMemset2D,
    hggcMemset2DAsync,
    hggcMemset2DAsync_ptsz,
    hggcMemset2D_ptds,
    hggcMemset3D,
    hggcMemset3DAsync,
    hggcMemset3DAsync_ptsz,
    hggcMemset3D_ptds,
    hggcMemsetAsync,
    hggcMemsetAsync_ptsz,
    hggcMemset_ptds,
    hggcStreamAttachMemAsync,
    hggcStreamAttachMemAsync_ptsz,
    hggcHostAlloc,
    hggcMalloc,
    hggcMalloc3D,
    hggcMalloc3DArray,
    hggcMallocArray,
    hggcMallocHost,
    hggcMallocManaged,
    hggcMallocMipmappedArray,
    hggcMallocPitch,
    hggcFree,
    hggcFreeArray,
    hggcFreeHost,
    hggcFreeMipmappedArray,
    hggcLaunch,
    hggcLaunch_ptsz,
    hggcLaunchKernel_ptsz,
    hggcLaunchCooperativeKernel_ptsz,
    hggcLaunchCooperativeKernelMultiDevice,
    
    # Hggc Driver API
    hgMemcpyHtoD,
    hg64MemcpyHtoD,
    hgMemcpyDtoH,
    hg64MemcpyDtoH,
    hgMemcpyDtoD,
    hg64MemcpyDtoD,
    hgMemcpyDtoA,
    hg64MemcpyDtoA,
    hgMemcpyAtoD,
    hg64MemcpyAtoD,
    hgMemcpyHtoA,
    hgMemcpyAtoH,
    hgMemcpyAtoA,
    hgMemcpy2D,
    hgMemcpy2DUnaligned,
    hgMemcpy3D,
    hg64Memcpy3D,
    hgMemcpyHtoDAsync,
    hg64MemcpyHtoDAsync,
    hgMemcpyDtoHAsync,
    hg64MemcpyDtoHAsync,
    hgMemcpyDtoDAsync,
    hg64MemcpyDtoDAsync,
    hgMemcpyHtoAAsync,
    hgMemcpyAtoHAsync,
    hgMemcpy2DAsync,
    hgMemcpy3DAsync,
    hg64Memcpy3DAsync,
    hg64Memcpy2D,
    hg64Memcpy2DUnaligned,
    hg64Memcpy2DAsync,
    hgMemcpy_v2,
    hgMemcpyHtoD_v2,
    hgMemcpyHtoDAsync_v2,
    hgMemcpyDtoH_v2,
    hgMemcpyDtoHAsync_v2,
    hgMemcpyDtoD_v2,
    hgMemcpyDtoDAsync_v2,
    hgMemcpyAtoH_v2,
    hgMemcpyAtoHAsync_v2,
    hgMemcpyAtoD_v2,
    hgMemcpyDtoA_v2,
    hgMemcpyAtoA_v2,
    hgMemcpy2D_v2,
    hgMemcpy2DUnaligned_v2,
    hgMemcpy2DAsync_v2,
    hgMemcpy3D_v2,
    hgMemcpy3DAsync_v2,
    hgMemcpyHtoA_v2,
    hgMemcpyHtoAAsync_v2,
    hgMemcpy,
    hgMemcpyAsync,
    hgMemcpyPeer,
    hgMemcpyPeerAsync,
    hgMemcpy3DPeer,
    hgMemcpy3DPeerAsync,
    hgMemcpyHtoD_v2_ptds,
    hgMemcpyDtoH_v2_ptds,
    hgMemcpyDtoD_v2_ptds,
    hgMemcpyDtoA_v2_ptds,
    hgMemcpyAtoD_v2_ptds,
    hgMemcpyHtoA_v2_ptds,
    hgMemcpyAtoH_v2_ptds,
    hgMemcpyAtoA_v2_ptds,
    hgMemcpy2D_v2_ptds,
    hgMemcpy2DUnaligned_v2_ptds,
    hgMemcpy3D_v2_ptds,
    hgMemcpy_ptds,
    hgMemcpyPeer_ptds,
    hgMemcpy3DPeer_ptds,
    hgMemcpyAsync_ptsz,
    hgMemcpyHtoAAsync_v2_ptsz,
    hgMemcpyAtoHAsync_v2_ptsz,
    hgMemcpyHtoDAsync_v2_ptsz,
    hgMemcpyDtoHAsync_v2_ptsz,
    hgMemcpyDtoDAsync_v2_ptsz,
    hgMemcpy2DAsync_v2_ptsz,
    hgMemcpy3DAsync_v2_ptsz,
    hgMemcpyPeerAsync_ptsz,
    hgMemcpy3DPeerAsync_ptsz,
    hgMemsetD8,
    hg64MemsetD8,
    hgMemsetD16,
    hg64MemsetD16,
    hgMemsetD32,
    hg64MemsetD32,
    hgMemsetD2D8,
    hg64MemsetD2D8,
    hgMemsetD2D16,
    hg64MemsetD2D16,
    hgMemsetD2D32,
    hg64MemsetD2D32,
    hgMemsetD8Async,
    hg64MemsetD8Async,
    hgMemsetD16Async,
    hg64MemsetD16Async,
    hgMemsetD32Async,
    hg64MemsetD32Async,
    hgMemsetD2D8Async,
    hg64MemsetD2D8Async,
    hgMemsetD2D16Async,
    hg64MemsetD2D16Async,
    hgMemsetD2D32Async,
    hg64MemsetD2D32Async,
    hgMemsetD8_v2,
    hgMemsetD16_v2,
    hgMemsetD32_v2,
    hgMemsetD2D8_v2,
    hgMemsetD2D16_v2,
    hgMemsetD2D32_v2,
    hgMemsetD8_v2_ptds,
    hgMemsetD16_v2_ptds,
    hgMemsetD32_v2_ptds,
    hgMemsetD2D8_v2_ptds,
    hgMemsetD2D16_v2_ptds,
    hgMemsetD2D32_v2_ptds,
    hgMemsetD8Async_ptsz,
    hgMemsetD16Async_ptsz,
    hgMemsetD32Async_ptsz,
    hgMemsetD2D8Async_ptsz,
    hgMemsetD2D16Async_ptsz,
    hgMemsetD2D32Async_ptsz,
    hgMemSetAccess,
    hgStreamAttachMemAsync,
    hgStreamAttachMemAsync_ptsz,
    hgMemAlloc,
    hg64MemAlloc,
    hgMemAllocPitch,
    hg64MemAllocPitch,
    hgMemAllocHost,
    hgMemHostAlloc,
    hg64MemHostAlloc,
    hgMemAlloc_v2,
    hgMemAllocPitch_v2,
    hgMemHostAlloc_v2,
    hgMemAllocHost_v2,
    hgMemAllocAsync,
    hgMemAllocAsync_ptsz,
    hgMemAllocFromPoolAsync,
    hgMemAllocFromPoolAsync_ptsz,
    hgMemFree,
    hg64MemFree,
    hgMemFreeHost,
    hgMemFree_v2,
    hgMemAddressFree,
    hgMemFreeAsync,
    hgMemFreeAsync_ptsz,
  • App-Range Replay模式下开启指令统计功能,在多卡场景下由于只能开单线程,无法通过多线程进行加速,所以profiling相对会比较慢。

  • ICNlink Section中显示的logical icnlink throughput查询的是MAC层数据,所以会比实际用户通过icnlink所产生的收发数据要多。

  • Mac系统上,在打开报告时强制退出GUI,可能会出现crashhang的问题。

  • Memory Chart中,Global -> KVDLoad Global Store Shared -> KVD的数据单位是req,这里并不准确,因为reqinst不对等,这里实际使用的是inst,与其对应用的Globa -> KSD数据是准确的,因为此处 reqinst是对等的。