You are here

OpenMx on GPU?

2 posts / 0 new
Last post
marijn's picture
Offline
Joined: 12/03/2010 - 13:08
OpenMx on GPU?

We are investigating the idea to make a GPU-version of OpenMx, in the sense that time consuming matrix functions will be executed on GPU, instead of CPU. I am new to OpenMx, so I don't know whether someone already looked into this, or is working on it. It seems quite straightforward to replace the Fortran implementation of the LAPACK functions being used by a GPU-implementation of LAPACK.

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
There is a potential for

There is a potential for speedup using a GPU for some of the computation. Here are a couple of things you should know:

  • OpenMx uses mostly BLAS calls to perform matrix operations. There might be a few LAPACK calls as well, Tim Brick would be able to comment on that.
  • We've hardwired our own DGEMM implementation instead of using the R BLAS shared library. Our unsafe implementation performs some optimizations that are incorrect in the presence of NA values. You probably want to change all the calls to "omxunsafedgemm" to use the GPU DGEMM.
  • Before porting the matrix operations to the GPU, to some profiling of your test scripts to see how much of the time is spent in the BLAS calls. In some of the test cases I have looked at, I have seen 50% of the time in matrix operations. So that's a maximum of a x2 speedup.
  • Use the latest version of OpenMx from the svn trunk.