921 字
5 分钟
CUDA性能分析
CUDA性能分析
命令
nsys profile --stats=true示例
iguolong@node01:~/SOFTWARE/LGLSOFTWARE/src/2D/fdtd$ nsys profile --stats=true ./gpu2dafdshots vp=vel.rsf den=den.rsf geo=geo.txt nbell=2 npml=10 fm=7 freesrf=y log=log.txt int NGPU=2 GPU_lists=0,2WARNING: CPU IP/backtrace sampling not supported, disabling.Try the 'nsys status --environment' command to learn more.
WARNING: CPU context switch tracing not supported, disabling.Try the 'nsys status --environment' command to learn more.
Generating '/tmp/nsys-report-dd6b.qdstrm'[1/8] [========================100%] report1.nsys-rep[2/8] [========================100%] report1.sqlite[3/8] Executing 'nvtxsum' stats reportSKIPPED: /data1/Uers_Login/liguolong/SOFTWARE/LGLSOFTWARE/src/2D/fdtd/report1.sqlite does not contain NV Tools Extension (NVTX) data. [4/8] Executing ‘osrtsum’ stats report
Time (%) Total Time (ns) Num Calls Avg (ns) Med (ns) Min (ns) Max (ns) StdDev (ns) Name 44.3 1,742,654,423 35 49,790,126.4 29,092,600.0 1,565 239,680,504 56,054,598.9 poll 25.7 1,009,566,364 4 252,391,591.0 160,490,033.0 30,028,539 658,557,759 277,831,157.7 sem_wait 25.4 1,000,183,939 2 500,091,969.5 500,091,969.5 500,084,193 500,099,746 10,997.6 pthread_cond_timedwait 3.0 116,840,484 1,197 97,611.1 11,747.0 1,033 15,257,078 792,696.0 ioctl 1.0 38,133,974 12 3,177,831.2 5,009.0 1,401 38,041,261 10,979,139.6 fgets 0.4 14,183,720 1 14,183,720.0 14,183,720.0 14,183,720 14,183,720 0.0 dup 0.1 4,953,654 16 309,603.4 1,861.0 1,141 4,924,647 1,230,678.5 read 0.1 3,183,639 55 57,884.3 10,100.0 5,280 963,461 177,045.2 mmap64 0.0 700,807 18 38,933.7 22,897.5 11,785 119,303 36,505.9 sem_timedwait 0.0 538,426 35 15,383.6 7,186.0 1,550 189,496 32,771.7 mmap 0.0 489,544 1 489,544.0 489,544.0 489,544 489,544 0.0 popen 0.0 464,601 96 4,839.6 4,271.5 1,888 11,338 1,812.6 open64 0.0 424,590 7 60,655.7 63,006.0 39,092 68,901 9,969.2 pthread_create 0.0 416,040 92 4,522.2 2,548.5 1,117 58,340 7,089.2 fopen 0.0 262,854 51 5,154.0 3,291.0 1,146 33,709 5,664.8 fread 0.0 218,350 2 109,175.0 109,175.0 6,742 211,608 144,862.1 send 0.0 198,363 1 198,363.0 198,363.0 198,363 198,363 0.0 pthread_mutex_lock 0.0 165,822 10 16,582.2 8,688.0 5,319 76,080 21,510.9 fflush 0.0 127,939 50 2,558.8 1,705.0 1,003 18,410 2,843.2 fclose 0.0 86,016 8 10,752.0 3,164.0 1,003 59,719 20,041.5 recvmsg 0.0 74,485 1 74,485.0 74,485.0 74,485 74,485 0.0 pthread_cond_wait 0.0 44,252 9 4,916.9 4,474.0 1,885 7,006 1,720.7 munmap 0.0 28,084 5 5,616.8 4,728.0 2,872 10,850 3,041.8 pthread_cond_broadcast 0.0 27,774 16 1,735.9 1,601.0 1,097 2,633 533.3 write 0.0 24,613 6 4,102.2 4,925.0 1,263 6,413 2,100.4 open 0.0 21,356 5 4,271.2 3,835.0 3,288 6,142 1,179.1 freopen 0.0 18,862 3 6,287.3 7,239.0 3,818 7,805 2,157.1 socket 0.0 15,586 3 5,195.3 5,928.0 3,097 6,561 1,844.6 pipe2 0.0 14,706 4 3,676.5 2,687.0 1,967 7,365 2,514.5 fwrite 0.0 14,072 1 14,072.0 14,072.0 14,072 14,072 0.0 connect 0.0 10,824 2 5,412.0 5,412.0 4,800 6,024 865.5 fopen64 0.0 10,018 6 1,669.7 1,693.0 1,031 2,176 410.2 fcntl 0.0 6,324 1 6,324.0 6,324.0 6,324 6,324 0.0 putc 0.0 4,877 2 2,438.5 2,438.5 2,001 2,876 618.7 bind 0.0 1,009 1 1,009.0 1,009.0 1,009 1,009 0.0 fputs[5/8] Executing ‘cudaapisum’ stats report
Time (%) Total Time (ns) Num Calls Avg (ns) Med (ns) Min (ns) Max (ns) StdDev (ns) Name 92.6 497,094,802 120,054 4,140.6 4,068.0 3,283 728,164 3,541.6 cudaLaunchKernel 6.2 33,100,190 2,235 14,809.9 3,638.0 2,852 9,293,949 304,133.2 cudaMemcpyAsync 0.5 2,602,744 90 28,919.4 5,115.5 245 424,303 82,776.6 cudaFree 0.3 1,829,814 78 23,459.2 6,066.0 3,972 251,066 49,384.5 cudaMalloc 0.2 1,332,591 2 666,295.5 666,295.5 19,398 1,313,193 914,851.2 cudaHostAlloc 0.1 427,207 78 5,477.0 4,941.5 2,507 19,464 2,742.1 cudaMemsetAsync 0.1 401,078 2 200,539.0 200,539.0 18,862 382,216 256,930.1 cudaFreeHost 0.0 93,598 2 46,799.0 46,799.0 22,372 71,226 34,545.0 cudaMemset 0.0 43,855 3 14,618.3 8,381.0 6,087 29,387 12,841.4 cudaStreamCreate 0.0 42,362 6 7,060.3 6,619.0 4,485 11,430 2,742.8 cudaEventRecord 0.0 18,465 6 3,077.5 1,425.5 464 8,707 3,401.4 cudaEventCreate 0.0 17,320 3 5,773.3 6,277.0 4,083 6,960 1,503.2 cudaStreamDestroy 0.0 10,439 3 3,479.7 3,867.0 1,953 4,619 1,374.6 cudaStreamSynchronize 0.0 8,055 3 2,685.0 2,640.0 2,544 2,871 168.1 cudaEventSynchronize 0.0 5,019 6 836.5 696.5 365 1,565 526.0 cudaEventDestroy 0.0 1,400 1 1,400.0 1,400.0 1,400 1,400 0.0 cuModuleGetLoadingMode[6/8] Executing ‘gpukernsum’ stats report
Time (%) Total Time (ns) Instances Avg (ns) Med (ns) Min (ns) Max (ns) StdDev (ns) GridXYZ BlockXYZ Name 36.4 163,783,064 30,003 5,458.9 5,728.0 4,864 6,400 378.1 13 25 1 16 16 1 _kernel_Acoustic2d_cpml_t 32.4 146,070,544 30,003 4,868.5 5,088.0 4,383 5,728 335.5 13 25 1 16 16 1 _kernel_Acoustic2d_cpml_v 15.9 71,828,147 30,003 2,394.0 2,495.0 2,175 3,135 146.8 24 1 1 16 1 1 _kernel_seis2d_record 15.2 68,640,277 30,003 2,287.8 2,336.0 2,079 2,944 133.5 5 5 1 1 1 1 _kernel_add2d_bellwlt 0.0 14,336 6 2,389.3 2,448.0 2,208 2,528 144.1 14 25 1 1 16 1 _kernel_mod2d_pad_z1 0.0 13,248 6 2,208.0 2,272.0 2,016 2,304 126.4 13 14 1 16 1 1 _kernel_mod2d_pad_x0 0.0 13,184 6 2,197.3 2,256.0 2,016 2,304 130.6 13 14 1 16 1 1 _kernel_mod2d_pad_x1 0.0 13,152 6 2,192.0 2,256.0 1,984 2,272 119.3 4 25 1 1 16 1 _kernel_mod2d_pad_z0 0.0 12,321 3 4,107.0 4,129.0 3,904 4,288 192.9 13 25 1 16 16 1 _kernel_vel_trans2d 0.0 9,120 3 3,040.0 2,976.0 2,656 3,488 419.7 626 1 1 16 1 1 _kernel_pro_2d_sou_P 0.0 7,360 3 2,453.3 2,528.0 2,272 2,560 157.9 10 25 1 1 16 1 _kernel_cpml2d_abcz1 0.0 6,752 3 2,250.7 2,336.0 2,080 2,336 147.8 13 10 1 16 1 1 _kernel_cpml2d_abcx0 0.0 6,720 3 2,240.0 2,304.0 2,080 2,336 139.5 13 10 1 16 1 1 _kernel_cpml2d_abcx1 0.0 5,792 3 1,930.7 1,984.0 1,792 2,016 121.2 5 5 1 1 1 1 _kernel_bell2d_coff[7/8] Executing ‘gpumemtimesum’ stats report
Time (%) Total Time (ns) Count Avg (ns) Med (ns) Min (ns) Max (ns) StdDev (ns) Operation 86.8 22,741,397 3 7,580,465.7 7,258,355.0 7,136,657 8,346,385 666,090.8 [CUDA memcpy DtoH] 12.3 3,222,238 2,232 1,443.7 1,440.0 864 4,800 174.3 [CUDA memcpy HtoD] 0.9 236,702 80 2,958.8 2,240.0 831 21,536 4,038.6 [CUDA memset][8/8] Executing ‘gpumemsizesum’ stats report
Total (MB) Count Avg (MB) Med (MB) Min (MB) Max (MB) StdDev (MB) Operation 51.246 80 0.641 0.008 0.000 14.761 2.808 [CUDA memset] 44.284 3 14.761 14.761 14.761 14.761 0.000 [CUDA memcpy DtoH] 1.795 2,232 0.001 0.001 0.000 0.040 0.001 [CUDA memcpy HtoD]Generated: /data1/Uers_Login/liguolong/SOFTWARE/LGLSOFTWARE/src/2D/fdtd/report1.nsys-rep /data1/Uers_Login/liguolong/SOFTWARE/LGLSOFTWARE/src/2D/fdtd/report1.sqlite