GPU_TARGET selection affects performance?

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Posts: 4
Joined: Wed Aug 07, 2019 2:03 pm

GPU_TARGET selection affects performance?

Post by tmalas » Thu Nov 21, 2019 8:23 pm


In a topic (viewtopic.php?f=2&t=1562&p=4385&hilit=G ... ture#p4385) I see that magma optimization is done by considering the target GPU architecture (GPU_TARGET in Does that mean if we select all relevant GPU architectures (for instance in a commercial solver that has to support many GPUs) we cannot have optimal performance? What is the disadvantage (if any) of selecting all architectures such as Kepler, Maxwell, Pascal, and Fermi in GPU_TARGET?

Thanks in advance

Stan Tomov
Posts: 283
Joined: Fri Aug 21, 2009 10:39 pm

Re: GPU_TARGET selection affects performance?

Post by Stan Tomov » Thu Nov 21, 2019 8:58 pm

MAGMA queries the GPU architecture through CUDA function calls, and tunes the code based on that. Thus, tuning is not based on the specified GPU_TARGET. GPU_TARGET is used for the compilation to generate code that is compatible with various GPUs. A disadvantage of specifying all is longer compilation time and larger library. An advantage is that the same code will support different GPUs and you would avoid the alternative of doing some type of JIT compilation.

Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: GPU_TARGET selection affects performance?

Post by mgates3 » Mon Apr 27, 2020 11:04 am

Do you mean AMD? ATI no longer exists.
Yes, there is a HIP version of MAGMA for AMD GPUs, available from MAGMA's website.


Post Reply