GPU 性能測試工具
GPU 服務經常有某塊顯卡故障,有些問題只有在高負載時才會出現,因此需要對其進行壓力測試。在網上找到一個比較專業的專門針對 GPU 的性能測試工具,該工具會對機器上的所有 GPU 進行性能測試,並記錄其在不同負載時的溫度。
工具說明
以下節選自 官方文檔
My program forks one process for each GPU on the machine, one process for keeping track of the GPU temperatures if available (e.g. Fermi Teslas don't have temp. sensors), and one process for reporting the progress. The GPU processes each allocate 90% of the free GPU memory, initialize 2 random 2048*2048 matrices, and continuously perform efficient CUBLAS matrix-matrix multiplication routines on them and store the results across the allocated memory. Both floats and doubles are supported. Correctness of the calculations is checked by comparing results of new calculations against a previous one -- on the GPU. This way the GPUs are 100% busy all the time and CPUs idle. The number of erroneous calculations is brought back to the CPU and reported to the user along with the number of operations performed so far and the GPU temperatures.
Real-time progress and summaries every ~10% are printed as shown below. Matrices processed are cumulative, whereas errors are for that summary. GPUs are separated by slashes. The program exits with a conclusion after it has been running for the number of seconds given as the last command line parameter. If you want to burn using doubles instead, give parameter "-d" before the burn duration. The example below was on a machine that had one working GPU and one faulty (too much factory overclocking and thus slightly unstable (you wouldn't have noticed it during gaming)):
使用方法
工具以容器形式運行,鏡像已上傳到鏡像倉庫。使用方法如下:
# docker images | grep burn
docker.io/gpu-burn 10.1 9734ebfcb3c5 7 weeks ago 1.2GB
# docker run --rm 9734
...
Killing processes.. Initialized device 3 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 3
Uninitted cublas
Initialized device 7 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 7
Uninitted cublas
Initialized device 6 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 6
Uninitted cublas
Initialized device 4 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 4
Uninitted cublas
Initialized device 8 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 8
Uninitted cublas
Initialized device 5 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 5
Uninitted cublas
Initialized device 0 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 0
Uninitted cublas
Initialized device 1 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 1
Uninitted cublas
Initialized device 9 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 9
Uninitted cublas
Initialized device 2 with 10989 MB of memory (10759 MB available, using 9683 MB of it), using FLOATS
Freed memory for dev 2
Uninitted cublas
done
Tested 10 GPUs:
GPU 0: OK
GPU 1: OK
GPU 2: OK
GPU 3: OK
GPU 4: OK
GPU 5: OK
GPU 6: OK
GPU 7: OK
GPU 8: OK
GPU 9: OK
測試完成后執行 nvidia-smi
命令查看 GPU 狀態。可以多次測試,確保無故障之后再上線。