Code covered by the BSD License  

Highlights from
Expectation Maximization of Gaussian Mixture Models via CUDA

5.0

5.0 | 1 rating Rate this file 33 Downloads (last 30 days) File Size: 144 KB File ID: #24020
image thumbnail

Expectation Maximization of Gaussian Mixture Models via CUDA

by Andrew Harp

 

06 May 2009 (Updated 21 May 2009)

CUDA enabled parallel EM for Gaussian Mixture Models, providing over 100x performance increases.

| Watch this File

File Information
Description

This is a parallel implementation of the Expectation Maximization algorithm for multidimensional Gaussian Mixture Models, designed to run on NVidia graphics cards supporting
CUDA. On my machine, it provides up to 170x performance increases (16 dims, 16 clusters, 1000000 data points).

See the report available at http://andrewharp.com/gmmcuda for more information.

The interesting code is all in gpugaumixmod.h and gpugaumixmod_kernel.h.
The reference CPU implementation is in cpugaumixmod.h.

It can be integrated into any C program on a CUDA enabled system. Additionally, Matlab integration is provided in gmm.cu.

Since the initial release I have added simultaneous random restarts. Experiment1 now takes advantage of this.

COMPILING
================================================================================
The config files are set up to run on my Windows Vista 64bit machine, but it's just a standard Cuda kernel underneath so it should be portable. A precompiled Windows 64-bit version is included.

See compile.m for the command I use to compile the CUDA/Mex files.

Go here to find the toolkit that contains the files you'll need for compiling on your platform: http://developer.nvidia.com/object/matlab_cuda.html

RUNNING
================================================================================
Once compiled, start off by running gmm_example in Matlab to see it in action.

See experiment1, experiment2, experiment3 for ready to run prebuilt speed analysis experiments.

MATLAB release MATLAB 7.8 (R2009a)
Other requirements NVidia CUDA capable graphics card
Tags for This File  
Everyone's Tags
clustering, cuda, em, expectation maximization(2), gaussian mixture, gmm, gpu, hpc, kmeans, mex, parallel computing, probability, statistics
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
24 Jul 2009 Dmitry Himrov

Andrew, hallo.

Please Describe the functions (syntax). Follow-up on the test examples are amazingly fast, but I can not run on real data. The data - economic timeseries.

TNX a lot.

24 Jul 2009 Andrew Harp

Hi Dmitry,
You could try adding a second dimension of all 0s to the data. However, you might not get a significant speedup unless you are trying to find a lot of clusters.

23 Jul 2009 Dmitry Himrov

How to compute this on 1 dimension Real(not sample)data, from 1 variable from matlab Workspace ?

Tnx a lot.

23 Jul 2009 Dmitry Himrov

How to use this software to my data in simple variable ?

Tnx a lot.

Updates
07 May 2009

updated description

08 May 2009

-Fixed synchronization issues in kernel
-Cleaned up mex wrapper
-Cleaned up some potential memory issues
-Combined GpuGauMixmod and GauMixmod classes into single class

21 May 2009

-Now handles simultaneous random restarts. Just make the
 matrix passed to it 3-dimensional, with the 3rd dimension containing different restarts.

Contact us