GPU 性能测试工具

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 状态。可以多次测试,确保无故障之后再上线。

上一篇:移植freemodbus库 随记


下一篇:如何查看JVM中堆、栈内存使用情况