where is the realization of magmablas_sgemm?

Open discussion for MAGMA

where is the realization of magmablas_sgemm?

Postby headfirst » Sat Dec 31, 2011 5:15 am

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
headfirst
 
Posts: 3
Joined: Wed Dec 07, 2011 3:51 am

Re: where is the realization of magmablas_sgemm?

Postby mgates3 » Fri Jan 06, 2012 4:52 pm

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
mgates3
 
Posts: 427
Joined: Fri Jan 06, 2012 2:13 pm

Re: where is the realization of magmablas_sgemm?

Postby headfirst » Mon Jan 16, 2012 7:33 am

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?
headfirst
 
Posts: 3
Joined: Wed Dec 07, 2011 3:51 am

Re: where is the realization of magmablas_sgemm?

Postby mgates3 » Tue Feb 07, 2012 5:47 pm

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
mgates3
 
Posts: 427
Joined: Fri Jan 06, 2012 2:13 pm

Re: where is the realization of magmablas_sgemm?

Postby headfirst » Wed Feb 08, 2012 3:09 am

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.
headfirst
 
Posts: 3
Joined: Wed Dec 07, 2011 3:51 am


Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest