Magma GEMM Sources for Fermi and matlab

Open discussion for MAGMA

Magma GEMM Sources for Fermi and matlab

Postby Boxed Cylon » Wed Aug 11, 2010 1:39 am

Just to report that the newly posted source code for SGEMM seems to work just fine in matlab so far. The trick seems to be to modify the Makefile in the tarball to read:
Code: Select all
        OPTS      =  -O3 -DADD_ -fPIC
        NVOPTS    =  --compiler-options "-fno-strict-aliasing -fPIC -D_GNU_SOURCE -pthread -fexceptions -m64" -arch sm_20 \
                    -DUNIX -O3

The key element being -fPIC.

With this change the resulting libmagmablas.a library archive can be linked to a matlab mex file (or mine anyways...), and seems to run correctly. I rather stumble around with these compiler options - happy to hear corrections if this is off the mark. This will be the first time I've gotten a magma routine to work with matlab...yay!

(Also changing the zero padding in my application to be modulo 96, rather than 32)

My own application has matrices on the smallish side (O(1000)), but runs a long loop of repeated calculations. This application calls SGEMM 3 times in each loop in addition to a few other BLAS routines and culaDeviceSgesv. Replacing the cublas 3.1 with the magma SGEMM improved the overall computation time by 17% - the computation takes about 20 min. to complete on a GTX480. So that's a nice improvement!
Boxed Cylon
 
Posts: 27
Joined: Sat Nov 21, 2009 6:03 pm

Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest