Ada Lovelace graphic card - MAGMA supports?

69 views
Skip to first unread message

Danesh Daroui

unread,
Aug 8, 2024, 5:47:33 PM8/8/24
to MAGMA User
Hi all,
We are upgrading our development platform and we are planning to install an Nvidia graphic card with Ada architecture, namely "Nvidia RTX 2000 Ada, 16 GB GDDR6, 4 mDP to DP". In the makefile only Fermi, Kepler, Maxwell, Pascal, Volta, Turing, Ampere, and Hopper architectures are supported. I am wondering if MAGMA supports this graphic card too? This should be in Ada Lovelace category of architectures.
Thanks for your help,
D.

Natalie Beams

unread,
Aug 8, 2024, 6:06:10 PM8/8/24
to MAGMA User, danesh...@gmail.com
Hi,

The important part of setting GPU_TARGET in make.inc is to get the correct CUDA compute capability (sm_) number. In the Makefile, you can see where GPU_TARGET
gets used to set CUDA_ARCH_ which eventually gets turned into lists of sm numbers. So, you should be able to set sm_89 (I think this is correct for Ada? But obviously,
replace with the correct number if not) directly, instead of using a name like Ampere.

Natalie


Danesh Daroui

unread,
Aug 8, 2024, 6:51:51 PM8/8/24
to Natalie Beams, MAGMA User
Hi Natalie,
Thanks for your help. The make.inc files explicitly state:

# GPU_TARGET contains one or more of Fermi, Kepler, Maxwell, Pascal, Volta, Turing, or Ampere
# to specify for which GPUs you want to compile MAGMA:
# Fermi - NVIDIA compute capability 2.x cards
# Kepler - NVIDIA compute capability 3.x cards
# Maxwell - NVIDIA compute capability 5.x cards
# Pascal - NVIDIA compute capability 6.x cards
# Volta/Turing - NVIDIA compute capability 7.x cards
# Ampere - NVIDIA compute capability 8.x cards
# Hopper - NVIDIA compute capability 9.x cards
# The default is "Volta Turing Ampere".
# Note that NVIDIA no longer supports 1.x cards, as of CUDA 6.5.
#
GPU_TARGET ?= Volta Turing Ampere

How can I know what number/name I should use for a specific graphics card? Can you please send me reference to a list of all supported codes/names? I need to make sure that the hardware is supported.

Regards,
D.


Natalie Beams

unread,
Aug 8, 2024, 7:07:28 PM8/8/24
to MAGMA User, danesh...@gmail.com, MAGMA User
Yes, but the provided make.inc files are just examples to help show how to configure different make parameters. If you look in the Makefile itself, you can see what happens to the 
GPU_TARGET argument from make.inc:

        CUDA_ARCH_ := $(GPU_TARGET)

        ifneq ($(findstring Kepler, $(GPU_TARGET)),)

                CUDA_ARCH_ += sm_30

                CUDA_ARCH_ += sm_35

        endif

        ifneq ($(findstring Maxwell, $(GPU_TARGET)),)

                CUDA_ARCH_ += sm_50

        endif

        ifneq ($(findstring Pascal, $(GPU_TARGET)),)

                CUDA_ARCH_ += sm_60

        endif

        ifneq ($(findstring Volta, $(GPU_TARGET)),)

                CUDA_ARCH_ += sm_70

        endif

        ifneq ($(findstring Turing, $(GPU_TARGET)),)

                CUDA_ARCH_ += sm_75

        endif

        ifneq ($(findstring Ampere, $(GPU_TARGET)),)

                CUDA_ARCH_ += sm_80

        endif

        ifneq ($(findstring Hopper, $(GPU_TARGET)),)

                CUDA_ARCH_ += sm_90

        endif

We see the first thing we do is set CUDA_ARCH_ := $(GPU_TARGET). If GPU_TARGET is sm_89 (or whatever number), it won't match any of the names, but that's ok, because
we already have the information we *really* need (the number). The Makefile then goes on to strip out the relevant sm numbers to create the argument to pass on to the CUDA compiler. 
The error message if this process goes wrong indicates that sm_XX is a valid option for GPU_TARGET:

$(error ERROR: unknown `GPU_TARGET=$(GPU_TARGET)`. Set cuda_arch to one or more of Kepler, Maxwell, Pascal, Volta, Turing, Ampere, Hopper, or valid sm_XX from nvcc -h)


I don't know if anyone has tested on Ada specifically; we don't have access to one here at the moment, so I can't say anything officially. But the current list of names that are
recognized is not meant to be a definitive list of all architectures that can run MAGMA.


Natalie

Mark Gates

unread,
Aug 9, 2024, 10:06:29 AM8/9/24
to Natalie Beams, MAGMA User, danesh...@gmail.com

If you don't know your architecture, attached is code that you can compile and run to get information on your GPU. `nvidia-smi -q` also provides a lot of useful information, but I didn't see the major, minor architecture.

After compiling (see comments in code) and running, look for major and minor. In this case, major=7, minor=0, and architecture is sm_{major}{minor} = sm_70.

> ./cuda-properties
--------------------------------------------------------------------------------
device                            0
name                              Tesla V100-SXM2-32GB
totalGlobalMem                    31.73 GiB (34072559616)
sharedMemPerBlock                 48 KiB (49152)
regsPerBlock                      65536
warpSize                          32
memPitch                          2147483647
maxThreadsPerBlock                1024
maxThreadsDim                     1024, 1024, 64
maxGridSize                       2147483647, 65535, 65535
clockRate                         1530 MHz (1530000 KHz)
totalConstMem                     64 KiB (65536)
major                             7
minor                             0
...


Mark

Interim Director, Innovative Computing Laboratory (ICL)
Research Assistant Professor, University of Tennessee, Knoxville

cuda-properties.cc
Reply all
Reply to author
Forward
0 new messages