The CUDA (Compute Unified Device Architecture) SDK can be used to write programms running on NVIDIA GPUs. Most workstations in CIP2 have CUDA installed, the workstations have aliases "cuda1"-"cuda6".

These machines are used for the CUDA seminar that is usually offered in the summer semester.

Hardware

We have one GeForce RTX 4090 with CUDA capability 8.9, one GeForce RTX 3080 Ti with CUDA capability 8.6, one GeForce GTX 1650 with CUDA capability 7.5, two GeForce GTX 1050 with CUDA capability 6.1, a GeForce GTX 960 with CUDA capability 5.2, a GeForce GTX 780 with CUDA capability 3.5 and a couple of others.

Host         | Alias | Card 
cip2ryzen4   | cuda1 | GeForce RTX 4090
cip2ryzen2 | cuda2 | GeForce RTX 3080 Ti
cip2ryzen3 | cuda3 | GeForce GTX 1650
cip1ivy | cuda4 | GeForce GTX 1050 Ti
cip1coffee2 | cuda5 | GeForce GTX 1050
cip2ryzen1 | cuda6 | GeForce GTX 960
cip1sandy2 | cuda7 | GeForce GTX 780

(older cards)
cont3iseven1 | X | GeForce GT 630
cont3iseven2 | X | GeForce GT 710

You can find out about the CUDA capabilities of the card in your workstation with the deviceQuery program from the samples directory:

[ga45can@cip2ryzen2] ~ /mount/share/cuda-samples/deviceQuery
/mount/share/cuda-samples/deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "NVIDIA GeForce RTX 3080 Ti"
  CUDA Driver Version / Runtime Version          11.4 / 11.4
  CUDA Capability Major/Minor version number:    8.6
  Total amount of global memory:                 12052 MBytes (12637962240 bytes)
  (080) Multiprocessors, (128) CUDA Cores/MP:    10240 CUDA Cores
  GPU Max Clock rate:                            1710 MHz (1.71 GHz)
  Memory Clock rate:                             9501 Mhz
  Memory Bus Width:                              384-bit
  L2 Cache Size:                                 6291456 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total shared memory per multiprocessor:        102400 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Managed Memory:                Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 9 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.4, CUDA Runtime Version = 11.4, NumDevs = 1
Result = PASS

Local users can also try the graphical examples in /mount/share/cuda-samples, there are the binaries, the source code and quite a lot of documentation. Compiling your own programs is rather easy, you just need to make a few modifications to the Makefile. After you have copied the source files to your home directory, change the line

CUDA_PATH ?= /usr/local/cuda
to
CUDA_PATH ?= /usr
(reflecting the fact that we install CUDA as part of the OS) and for the more complex examples
INCLUDES := -I../../common/inc
to
INCLUDES := -I/mount/share/cuda-samples/Common

(necessary because the includes of the samples are in the cuda tree, not in your HOME.) Also, you should comment out (or delete) the lines that make a copy of the finished binary,

#       $(EXEC) mkdir -p ../../bin/$(OS_ARCH)/$(OSLOWER)/$(TARGET)$(if $(abi),/$(abi))
# $(EXEC) cp $@ ../../bin/$(OS_ARCH)/$(OSLOWER)/$(TARGET)$(if $(abi),/$(abi))

This way you should be able to compile everything by typing make.

Documentation

Excellent Documentation is available at the NVIDIA homepage. You should check out this extensive site. But for starters it should be enough to read Getting_Started. Last but not least, don't forget to checkout the webinars.

  • Keine Stichwörter