Compare the differences in the MAGMA library

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Selena
Posts: 2
Joined: Sun Oct 27, 2019 2:51 am
Location: new york
Contact:

Compare the differences in the MAGMA library

Post by Selena » Sun Oct 27, 2019 3:09 am

Hello all member!
In the before magma linear algebra library. I Used version 1.6.1.
http://icl.cs.utk.edu/magma/software/

In the testing code exercising dgemm functionality (source code: testing_dgemm.cpp), there was a call to functions magma_dgemm and magmablas_dgemm. Can someone clarify the difference between the two? Which one is more general (not tied to just GPU)?
Thank's a lot!

mgates3
Posts: 902
Joined: Fri Jan 06, 2012 2:13 pm

Re: Compare the differences in the MAGMA library

Post by mgates3 » Sun Oct 27, 2019 11:19 pm

Use magma_dgemm. It is simply a wrapper around cublasDgemm.

magmablas_dgemm is MAGMA's own implementation, which dates back to the Fermi architecture. NVIDIA adapted this implementation for the cublasDgemm, and further optimized it. We keep the code around in case someone wants an open-source implementation to study or modify.

They are both GPU-only implementations.

-mark

Selena
Posts: 2
Joined: Sun Oct 27, 2019 2:51 am
Location: new york
Contact:

Re: Compare the differences in the MAGMA library

Post by Selena » Sat Nov 02, 2019 4:16 am

mgates3 wrote:
Sun Oct 27, 2019 11:19 pm
Use magma_dgemm. It is simply a wrapper around cublasDgemm.

magmablas_dgemm is MAGMA's own implementation, which dates back to the Fermi architecture. NVIDIA adapted this implementation for the cublasDgemm, and further optimized it. We keep the code around in case someone wants an open-source implementation to study or modify.

They are both GPU-only implementations.

-mark
Thanks for your information for sharing.
Through An inspection of the source code reveals that magmablas_Xgemm is actually a C function that launches an appropriate gemm kernel on the GPU. Thus magmablas_Xgemm is a GPU-specific routine. On the other hand, magma_Xgemm is intended to be accelerator-agnostic routine that (currently) can be used for either GPU (NVIDIA/AMD, ...) or MIC.

Ref files, relative to MAGMA source directory (the CUDA edition):

Code: Select all

./magmablas/dgemm_fermi.cu
./interface_cuda/blas_d.cpp

Post Reply