Difference between revisions of "Nvidia CUDA Toolkit"
(updated the currently available cuda versions on hipergator. removed deprecated version not available anymore.) |
|||
(86 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Software]] | + | [[Category:Software]][[Category:Programming]][[Category:Library]][[Category:Graphics]][[Category:GPU]] |
+ | {|align=right | ||
+ | |__TOC__ | ||
+ | |} | ||
{|<!--CONFIGURATION: REQUIRED--> | {|<!--CONFIGURATION: REQUIRED--> | ||
|{{#vardefine:app|cuda}} | |{{#vardefine:app|cuda}} | ||
Line 6: | Line 9: | ||
|{{#vardefine:conf|}} <!--CONFIGURATION--> | |{{#vardefine:conf|}} <!--CONFIGURATION--> | ||
|{{#vardefine:exe|1}} <!--ADDITIONAL INFO--> | |{{#vardefine:exe|1}} <!--ADDITIONAL INFO--> | ||
− | |{{#vardefine:pbs|1}} <!-- | + | |{{#vardefine:pbs|1}} <!--JOB SCRIPTS--> |
|{{#vardefine:policy|1}} <!--POLICY--> | |{{#vardefine:policy|1}} <!--POLICY--> | ||
|{{#vardefine:testing|}} <!--PROFILING--> | |{{#vardefine:testing|}} <!--PROFILING--> | ||
Line 18: | Line 21: | ||
{{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}} | {{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}} | ||
CUDA™ is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU). With millions of CUDA-enabled GPUs sold to date, software developers, scientists and researchers are finding broad-ranging uses for GPU computing with CUDA. | CUDA™ is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU). With millions of CUDA-enabled GPUs sold to date, software developers, scientists and researchers are finding broad-ranging uses for GPU computing with CUDA. | ||
+ | |||
+ | See also: [https://help.rc.ufl.edu/doc/GPU_Access GPU Access] | ||
<!--Modules--> | <!--Modules--> | ||
− | == | + | ==Environment Modules== |
− | cuda | + | Use the 'module avail' command after loading a cuda environment module to see the available module trees or see which compiler and openmpi modules require the cuda module to be loaded. |
+ | |||
==System Variables== | ==System Variables== | ||
− | * HPC_{{ | + | * HPC_{{uc:{{#var:app}}}}_DIR |
− | * HPC_{{ | + | * HPC_{{uc:{{#var:app}}}}_BIN |
− | * HPC_{{ | + | * HPC_{{uc:{{#var:app}}}}_INC |
− | * HPC_{{ | + | * HPC_{{uc:{{#var:app}}}}_LIB |
<!--Configuration--> | <!--Configuration--> | ||
{{#if: {{#var: conf}}|==Configuration== | {{#if: {{#var: conf}}|==Configuration== | ||
Line 31: | Line 37: | ||
|}} | |}} | ||
<!--Run--> | <!--Run--> | ||
− | == | + | ==Program Development== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ===Environment=== | ||
+ | For CUDA development please load the "cuda" module. Doing so will ensure that your environment is set up correctly for the use of the CUDA compiler, header files, and libraries. The cuda versions below are currently supported on hipergator. | ||
+ | <div class="mw-collapsible mw-collapsed" style="width:70%; padding: 5px; border: 1px solid gray;"> | ||
+ | ''Expand to view example of loading/using cuda.'' | ||
+ | <div class="mw-collapsible-content" style="padding: 5px;"> | ||
<pre> | <pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
$ module spider cuda | $ module spider cuda | ||
− | + | ------------------------------------------------------------- | |
− | + | cuda: | |
+ | ------------------------------------------------------------- | ||
Description: | Description: | ||
NVIDIA CUDA Toolkit | NVIDIA CUDA Toolkit | ||
Versions: | Versions: | ||
− | cuda/4.2 | + | cuda/10.0.130 |
− | cuda/ | + | cuda/11.0.207 |
+ | cuda/11.1.0 | ||
+ | cuda/11.4.3 | ||
+ | cuda/11.6 | ||
+ | cuda/12.2.0 | ||
+ | cuda/12.2.2 | ||
+ | cuda/12.4.1 | ||
− | $ module load cuda/ | + | -------------------------------------------------------------------------------------------------------------------- |
+ | For detailed information about a specific "cuda" module (including how to load the modules) use the module full name. | ||
+ | For example: | ||
+ | |||
+ | $ module spider cuda/10.0.130 | ||
+ | -------------------------------------------------------------------------------------------------------------------- | ||
+ | |||
+ | $ module load cuda/10.0.130 | ||
$ which nvcc | $ which nvcc | ||
− | / | + | /apps/compilers/cuda/10.0.130/bin/nvcc |
$ printenv | grep CUDA | $ printenv | grep CUDA | ||
− | HPC_CUDA_LIB=/ | + | HPC_CUDA_LIB=/apps/compilers/cuda/10.0.130/lib64 |
− | HPC_CUDA_DIR=/ | + | HPC_CUDA_DIR=/apps/compilers/cuda/10.0.130 |
− | HPC_CUDA_BIN=/ | + | HPC_CUDA_BIN=/apps/compilers/cuda/10.0.130/bin |
− | HPC_CUDA_INC=/ | + | HPC_CUDA_INC=/apps/compilers/cuda/10.0.130/include |
− | </ | + | UFRC_FAMILY_CUDA_VERSION=10.0.130 |
+ | </pre> | ||
+ | </div> | ||
+ | </div> | ||
+ | ===Selecting CUDA Arch Flags=== | ||
+ | When compiling with NVCC, you need to specify the Nvidia architecture that the CUDA files will be compiled for. Please refer to [https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list GPU Feature List] for CUDA naming scheme sm_xy where x denotes the GPU generation and y denotes the version. The table below lists the SM flags for the three types of GPUs on HiPerGator. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! SM !! Nvidia Cards | ||
+ | |- | ||
+ | | SM_37 || Tesla K80 (No longer available) | ||
+ | |- | ||
+ | | SM_61 || GeForce GTX 1080Ti | ||
+ | |- | ||
+ | | SM_75|| GeForce RTX 2080Ti | ||
+ | |- | ||
+ | | SM_80 || DGX A100 | ||
+ | |} | ||
+ | ==Sample GPU Batch Job Scripts== | ||
− | |||
− | |||
− | |||
− | |||
− | + | See the [[Example_SLURM-GPU-Job-Scripts]] page for an example. | |
− | See the [[ | ||
− | |}} | + | <!--|}}--> |
<!--Faq--> | <!--Faq--> |
Latest revision as of 13:22, 31 May 2024
Description
cuda website
CUDA™ is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU). With millions of CUDA-enabled GPUs sold to date, software developers, scientists and researchers are finding broad-ranging uses for GPU computing with CUDA.
See also: GPU Access
Environment Modules
Use the 'module avail' command after loading a cuda environment module to see the available module trees or see which compiler and openmpi modules require the cuda module to be loaded.
System Variables
- HPC_CUDA_DIR
- HPC_CUDA_BIN
- HPC_CUDA_INC
- HPC_CUDA_LIB
Program Development
Environment
For CUDA development please load the "cuda" module. Doing so will ensure that your environment is set up correctly for the use of the CUDA compiler, header files, and libraries. The cuda versions below are currently supported on hipergator.
Expand to view example of loading/using cuda.
$ module spider cuda ------------------------------------------------------------- cuda: ------------------------------------------------------------- Description: NVIDIA CUDA Toolkit Versions: cuda/10.0.130 cuda/11.0.207 cuda/11.1.0 cuda/11.4.3 cuda/11.6 cuda/12.2.0 cuda/12.2.2 cuda/12.4.1 -------------------------------------------------------------------------------------------------------------------- For detailed information about a specific "cuda" module (including how to load the modules) use the module full name. For example: $ module spider cuda/10.0.130 -------------------------------------------------------------------------------------------------------------------- $ module load cuda/10.0.130 $ which nvcc /apps/compilers/cuda/10.0.130/bin/nvcc $ printenv | grep CUDA HPC_CUDA_LIB=/apps/compilers/cuda/10.0.130/lib64 HPC_CUDA_DIR=/apps/compilers/cuda/10.0.130 HPC_CUDA_BIN=/apps/compilers/cuda/10.0.130/bin HPC_CUDA_INC=/apps/compilers/cuda/10.0.130/include UFRC_FAMILY_CUDA_VERSION=10.0.130
Selecting CUDA Arch Flags
When compiling with NVCC, you need to specify the Nvidia architecture that the CUDA files will be compiled for. Please refer to GPU Feature List for CUDA naming scheme sm_xy where x denotes the GPU generation and y denotes the version. The table below lists the SM flags for the three types of GPUs on HiPerGator.
SM | Nvidia Cards |
---|---|
SM_37 | Tesla K80 (No longer available) |
SM_61 | GeForce GTX 1080Ti |
SM_75 | GeForce RTX 2080Ti |
SM_80 | DGX A100 |
Sample GPU Batch Job Scripts
See the Example_SLURM-GPU-Job-Scripts page for an example.