File Exchange Pick of the Week

Benchmarking your GPU

Posted by Jiro Doke,

Jiro's pick this week is GPUBench by Ben Tordoff.

Some of you may know of the bench function. It allows you to benchmark your MATLAB on your machine and compare it against other machines. It performs some mathematical computation tests, as well as graphics tests. Note, as mentioned in the documentation, that bench is for comparing a particular version of MATLAB on different machines, not comparing different versions of MATLAB on a single machine.

GPUBench is GPU version of bench. With Parallel Computing Toolbox, you can perform MATLAB computations on NVIDIA CUDA GPUs with Compute Capability of 1.3 or greater. But your mileage may vary depending on the hardware you have. Sometimes, looking at just the Compute Capability may not be enough to see if one card is better than another for MATLAB computations. GPUBench will test your card and compare with other common GPU cards. Here's a sample table that gets generated from the benchmark. It reports in gigaFLOPS, so higher the number, the better the performance.

When I bought a MacBookPro last year and noticed that it had a supported GPU card, I ran the benchmark on it and got the following result. Note that this was done with an older version, so the list of cards is a bit old.

The "Host PC" refers to the CPU on my Mac, and "GeForce GT 650M" is the GPU that's equipped. We can see that the GPU seems to outperform the CPU on single-precision computations but not so much on double-precision computations.

Ben periodically updates the data files to include the newer GPU models that have come out. As of the writing of this post, the version includes benchmark data for K20.

Comments

Do you use GPUs, or are you interested in using GPUs for your work? Let us know about it here. If you do GPU computing in MATLAB, give this App a try and leave a comment for Ben.


Get the MATLAB code

Published with MATLAB® R2013a

Comments are closed.

These postings are the author's and don't necessarily represent the opinions of MathWorks.