GPU_TARGET selection affects performance?

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

GPU_TARGET selection affects performance?

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

Hi,

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 make.inc). 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: 271
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.

Post Reply