Hello,
How would I link both FERMI and KEPLER versions of the MAGMA libraries (libmagma.a and libmagmablas.a) into my application? In essence, I would like for my application to use FERMI based MAGMA unless KEPLER resources are available, but I do not want to make 2 separate application builds.
Supporting multiple GPU_TARGET in one application
Re: Supporting multiple GPU_TARGET in one application
I think the best for you currently is:
1) In make.inc, set GPU_TARGET = Kepler
2) In Makefile.internal, add cuda 2.0 to the NVOPTS:
NVOPTS += -DGPUSHMEM=300 \
-gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35
-mark
1) In make.inc, set GPU_TARGET = Kepler
2) In Makefile.internal, add cuda 2.0 to the NVOPTS:
NVOPTS += -DGPUSHMEM=300 \
-gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35
-mark
Re: Supporting multiple GPU_TARGET in one application
I am now using MAGMA 1.6.2. We are in the process of integrating MAGMA into a commercial product. In the make.inc file there is this snippet :
I would like to compile my commercial application to support multiple GPU_TARGET (not just Kepler.) My understanding of this flag is I need to compile multiple binaries depending on the GPU_TARGET value. However, this is not a good bundling architecture. How would my application link to multiple copies of "libmagma" - each copy distinguished by a different GPU_TARGET - yet use the right function signature from the right libmagma library? I don't want my application to handle logic of switching MAGMA calls based on detected card on box - I think MAGMA should be handling that logic.
Code: Select all
#GPU_TARGET ?= Fermi Kepler
Re: Supporting multiple GPU_TARGET in one application
You can specify multiple CUDA architectures in GPU_TARGET. The default is "Fermi Kepler". They will all be compiled into one MAGMA library. I believe it should also be forward compatible, so it should run on newer architectures after Kepler, albeit perhaps not optimal speed.
We no longer support CUDA arch 1.x (confusingly known as Tesla), because CUDA >= 6.5 no longer supports it.
-mark
We no longer support CUDA arch 1.x (confusingly known as Tesla), because CUDA >= 6.5 no longer supports it.
-mark