Page 1 of 1

where is the realization of magmablas_sgemm?

PostPosted: Sat Dec 31, 2011 5:15 am
by headfirst
Hi,
I have been studying the source code of magma1.1 recently.
But I found some very strange thing and that tangled me.
When I want to learn the matrix multiply, so I just find the corresponding code, but what I get is just
the declaration of magmablas_sgemm in magmablas/magmablas_s.h, where is the realization of magmablas_sgemm ?

Kindly reply if you know some advice.

thanks in advance.
Ke Zeng

Re: where is the realization of magmablas_sgemm?

PostPosted: Fri Jan 06, 2012 4:52 pm
by mgates3
I think you mean you found the declaration in include/magmablas_s.h
The actual code is in several files matching magmablas/sgemm*.cu

-mark

Re: where is the realization of magmablas_sgemm?

PostPosted: Mon Jan 16, 2012 7:33 am
by headfirst
mgates3 wrote:I think you mean you found the declaration in include/magmablas_s.h
The actual code is in several files matching magmablas/sgemm*.cu

-mark

Thanks,but how does the declaration in include/magmablas_s.h match the actual code?
At first i think there must be some function to choose the corresponding function such as magmablas/sgemm*.cu, but i cannot find the function.
Is anybody know?

Re: where is the realization of magmablas_sgemm?

PostPosted: Tue Feb 07, 2012 5:47 pm
by mgates3
In sgemm_fermi.cu, there is:

#define magmablas_sgemm_fermi magmablas_sgemm

extern "C" void
magmablas_sgemm_fermi( char TRANSA, char TRANSB, int m , int n , int k ,
float alpha, const float *A, int lda,
const float *B, int ldb,
float beta, float *C, int ldc )
{
// the actual sgemm code
}

Similarly, there is a #define in the sgemm_tesla.cu file, for cards with capability <= 1.3. Which file gets compiled is handled by the magmablas Makefile, using ${GPU_TARGET} defined in make.inc.

-mark

Re: where is the realization of magmablas_sgemm?

PostPosted: Wed Feb 08, 2012 3:09 am
by headfirst
mgates3 wrote:In sgemm_fermi.cu, there is:
#define magmablas_sgemm_fermi magmablas_sgemm

extern "C" void
magmablas_sgemm_fermi( char TRANSA, char TRANSB, int m , int n , int k ,
float alpha, const float *A, int lda,
const float *B, int ldb,
float beta, float *C, int ldc )
{
// the actual sgemm code
}

Similarly, there is a #define in the sgemm_tesla.cu file, for cards with capability <= 1.3. Which file gets compiled is handled by the magmablas Makefile, using ${GPU_TARGET} defined in make.inc.

-mark


oh, i find it, thanks.