using clMAGMA for Nvidia GPUs?

Open discussion for MAGMA

using clMAGMA for Nvidia GPUs?

Postby Gopal_HC » Sat Nov 30, 2013 2:46 am

Hi everyone,

I am new to MAGMA usage, interested to port existing CUDA code into OpenCL code using clMAGMA.
The detail of my system is :
OS :: Ubuntu 12.04LTS
GPU :: 2 Nvidia K20s

As per the documentation of clMAGMA uses, I understand that
1. it uses AMD APPML BLAS library for AMD GPU. Since it based on OpenCL hence I hope it should work for Nvidia GPU cards too. Does anyone has experience with the same scenario to make me sure whether it would work for Nvidia GPUs?
2. The other alternative I think is to use MAGMA 1.4 which is based on CUDA to run on multiple Nvidia GPUs. Is that correct?

Thanks and Regards,
Gopal
Gopal_HC
 
Posts: 6
Joined: Sat Nov 30, 2013 2:23 am

Re: using clMAGMA for Nvidia GPUs?

Postby mgates3 » Sun Dec 01, 2013 2:37 am

I would recommend using the CUDA version of MAGMA. It is more developed than the newer clMAGMA version. On Nvidia cards, I would expect better performance from the CUDA version, using the highly optimized CUBLAS library.

Yes, the CUDA version of MAGMA supports multiple GPUs. See routines ending with _m or _mgpu.
-mark
mgates3
 
Posts: 428
Joined: Fri Jan 06, 2012 2:13 pm

Re: using clMAGMA for Nvidia GPUs?

Postby Gopal_HC » Sun Dec 01, 2013 7:15 am

Hi mark,
Thanx for the reply !!
mgates3 wrote:I would recommend using the CUDA version of MAGMA. It is more developed than the newer clMAGMA version. On Nvidia cards, I would expect better performance from the CUDA version, using the highly optimized CUBLAS library.

Yes, the CUDA version of MAGMA supports multiple GPUs. See routines ending with _m or _mgpu.
-mark


Sure I would use CUDA version of MAGMA. But I have one more doubt.
First let me tell you my problem, actually I have a CUDA code which uses cuBLAS library to compute some of the BLAS algorithms on GPU. My requirement is to port this CUDA code using MAGMA.
Since CUDA version of MAGMA is supposed to run on Hybrid systems(combination of GPUs and Multi-core CPUs), but our existing cuBLAS code is designed to run on only GPU. Henec,
1. Would it be possible to use CUDA version of MAGMA to port existing cuBLAS code to run only on GPUs?
2. Can you please tell me a good alternative to port my existing cuBLAS code using CUDA version of MAGMA?

Best Regards,
Gopal
Gopal_HC
 
Posts: 6
Joined: Sat Nov 30, 2013 2:23 am

Re: using clMAGMA for Nvidia GPUs?

Postby mgates3 » Mon Dec 02, 2013 10:57 am

It isn't clear exactly what you are doing or why you need GPU-only versions of functions. Are you simultaneously using the CPU for some other purpose such that you absolutely cannot use both the CPU and the GPU together?

MAGMA has two interfaces for many (not all) functions: a CPU interface and a GPU interface. The CPU interface (e.g., magma_dgetrf) takes a matrix in CPU memory, uses both the CPU and GPU for computation, then returns the result in CPU memory. The GPU interface (e.g., magma_dgetrf_gpu) takes a matrix in GPU memory, uses both the CPU and GPU for computation, then returns the result in GPU memory. Most of these functions are synchronous -- the result is ready when the function returns. So in most cases you do not have to be aware that it is hybrid. Just call MAGMA to compute LU, for instance, and then use the result when it is done.

Obviously CUBLAS runs only on the GPU, while we use regular BLAS (e.g., MKL, ATLAS, etc.) on the CPU.

The same is true for both OpenCL and CUDA versions of MAGMA.
-mark
mgates3
 
Posts: 428
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], mgates3 and 3 guests