Code covered by the BSD License  

Highlights from
GPUBench

4.66667

4.7 | 3 ratings Rate this file 144 Downloads (last 30 days) File Size: 257 KB File ID: #34080
image thumbnail

GPUBench

by Ben Tordoff

 

05 Dec 2011 (Updated 08 May 2013)

Compare GPUs using standard numerical benchmarks in MATLAB.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

GPUBENCH times different MATLAB GPU tasks and estimates the peak performance of your GPU in floating-point operations per second (FLOP/s). It produces a detailed HTML report showing how your GPU's performance compares to pre-stored performance results from a range of other GPUs.

Note that this tool is designed for comparing GPU hardware. It does not compare GPU performance across different MATLAB releases.

Requires MATLAB R2011b or above and a GPU with CUDA Compute Capability 1.3 or higher.

Acknowledgements

Multi Progress Bar and Cpu Info inspired this file.

Required Products Parallel Computing Toolbox
MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Other requirements GPU with CUDA Compute Capability 1.3 or higher.
Tags for This File  
Everyone's Tags
bench, benchmark, gpu, performance, pick of the week, potw, timing, utilities
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
24 May 2013 Justin

I am getting the following error when attempting to use your app on R2013a:

Error using evalin
Undefined function or variable 'GPUBenchApp'.

Error in appinstall.internal.runapp>execute (line 69)
out = evalin('caller', [script ';']);

Error in appinstall.internal.runapp>runapp13a (line 51)
outobj = execute(fullfile(appinstalldir, [wrapperfile 'App.m']));

Error in appinstall.internal.runapp>runcorrectversion (line 35)
appobj = runapp13a(appinstalldir);

Error in appinstall.internal.runapp (line 17)
out = runcorrectversion(appmetadata, appentrypoint, appinstalldir);

09 May 2013 Ben Tordoff

Hi Andrei,

yes, you can do this with the tool as it is, although it isn't that easy. I will look at adding a more convenient way later.

1. Remove the data-file for the release you are using (so data/R2013a.mat if using the latest release).
2. Capture and store the results from each machine/GPU you are interested in:

>> data = gpuBench();
>> gpubench.saveResults(data);

This will build up a new data-file specific to your machines and the MATLAB release being used. Let me know if this doesn't work for you or you have suggestions as to how to make this more convenient.

Cheers
Ben

08 May 2013 Andrei Borissovitch Utkin

As stated in the description, GPUBench "produces a detailed HTML report showing how your GPU's performance compares to PRE-STORED PERFORMANCE RESULTS from a range of other GPUs." Although being very happy with GPUBench, I found strange that the application only allows to compare against pre-defined set of other hardware.

Quite a typical situation is that your bosses (or yourself) want to compare machines that the company already has (e.g., to decide what comps to allocate for the development and what for running release versions, or to decide which computers must be enhanced with additional processor units). It would be fine to have an opportunity to run GPUBench in one computer, save the benchmark structure to a file, copy this file to another computer and run the GPUBench on that another computer in such a manner that its data are added to the benchmark structure. Thus the User could compare his/her own computers.

Is this mode can be realized somehow in the current version of the application? If not, can it be included in future versions?

17 Apr 2013 Mirko

Wow, super thought through app. Smart to include own Computer and other GPUs.

16 Apr 2012 Narfi

If you run into CUDA_ERROR_LAUNCH_TIMEOUT, have a look at

http://www.mathworks.com/gputimeout

It explains how to change your system settings to avoid this.

13 Apr 2012 David Allen

Hi Ben,

Thanks for the code.

I am getting this error though. I know it is to do with the time-out settings, but don't know what to do from here. My Quadro 1000M does not appear to be speeding up my ffts etc.

Warning: An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_LAUNCH_TIMEOUT.
> In gpuBench at 75
Warning: An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_LAUNCH_TIMEOUT.
> In gpuBench at 75
Warning: An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_LAUNCH_TIMEOUT.
> In gpuBench at 75
An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_LAUNCH_TIMEOUT.

Error in C:\Program
Files\MATLAB\R2011b\toolbox\distcomp\gpu\+parallel\+internal\+gpu\currentDeviceFreeMem.p>currentDeviceFreeMem
(line 7)

Error in parallel.gpu.CUDADevice/get.FreeMemory (line 107)
fm = parallel.internal.gpu.currentDeviceFreeMem();

Error in gpuBench>getTestSizes (line 371)
freeMem = gpu.FreeMemory;

Error in gpuBench>runMTimes (line 163)
sizes = getTestSizes( type, safetyFactor, device );

Error in gpuBench (line 76)
gpuData = runMTimes( gpuData, reps, 'double', 'GPU', progressTitle, numTasks );

Thanks,
Dave

21 Feb 2012 Ben Tordoff

Hi Tristan,

GPUBench only benchmarks one GPU at a time. Since it just uses the current device, you can use "gpuDevice(n)" to select the nth GPU before calling it. However, NVIDIA's drivers normally default to the most powerful card first, so if you're only getting results for your slowest card that indicates a wider problem. Can you try doing:

>> gpuDeviceCount()

to make sure all four devices are found? You can then try

>> for ii=1:gpuDeviceCount(), gpuDevice(ii), end

to print out the details of all the cards found. You need to make sure all of them have the "DeviceSupported" flag set to 1.

I've never seen the particular error you report, and looking on NVIDIA's forums they say it is most likely caused by a hardware problem and once you hit it you have to reboot to fully flush memory:

http://forums.nvidia.com/index.php?showtopic=204333

That doesn't sound good, I'm afraid!
Let me know how you get on.

Ben

20 Feb 2012 Tristan Martel

I've attempted to run benchmark. I have 3 teslas and a quadro in my machine. I noticed that only my fourth GPU was being used at all. The benchmark failed at 19% with the following error:
An unexpected error occurred during CUDA execution. The CUDA error was: CUDA_ERROR_ECC_UNCORRECTABLE.

Error in C:\Program
Files\MATLAB\R2011b\toolbox\distcomp\gpu\+parallel\+internal\+gpu\currentDeviceFreeMem.p>currentDeviceFreeMem
(line 7)

Error in parallel.gpu.CUDADevice/get.FreeMemory (line 107)
fm = parallel.internal.gpu.currentDeviceFreeMem();

Error in gpuBench>getTestSizes (line 371)
freeMem = gpu.FreeMemory;

Error in gpuBench>runMTimes (line 163)
sizes = getTestSizes( type, safetyFactor, device );

Error in gpuBench (line 76)
gpuData = runMTimes( gpuData, reps, 'double', 'GPU', progressTitle, numTasks );

Thanks for your help on this.

25 Jan 2012 Thomas

Good benchmark for GPU's

Updates
18 Jan 2012

Add data for C2075

23 Jul 2012

Try to prevent timeout being hit on very slow GPUs that happen to be driving the display as well.

16 Oct 2012

* Add an "app" version for use with R2012b and above
* Updated data-files for R2012a and R2012b

01 Nov 2012

* Suppressed warnings about results being skipped
* Now includes a set of pre-stored host-PC data so that you get a rough CPU/GPU comparison when just viewing the report
* Reduced largest size used for MTIMES to avoid out of memory

08 May 2013

* Add results for R2013a (including K20!)

Contact us