Main Content

Compute capability

Select CUDA compute capability for code generation

Since R2020b

Model Configuration Pane: Code Generation / GPU Code

Description

The Compute capability parameter specifies the minimum compute capability of an NVIDIA® GPU device for which CUDA® code is generated. CUDA compute capability is a numerical representation of the capabilities and features provided by a GPU architecture for executing CUDA code. The compute capability version is denoted by a major and minor version number and determines the available hardware features, instruction sets, memory capabilities, and other GPU-specific functionalities that can be utilized by CUDA programs. It also affects the compatibility and performance of CUDA code on different GPUs.

For example, a GPU with compute capability 7.0 will have more features and capabilities compared to a GPU with compute capability 3.2. Newer compute capabilities generally introduce enhancements, improved performance, and additional features, allowing you to take advantage of the latest GPU architecture advancements. Certain CUDA features might may have specific compute capability requirements. To see the CUDA compute capability requirements for code generation, consult the following table.

TargetCompute Capability

CUDA MEX

See GPU Computing Requirements (Parallel Computing Toolbox).

Source code, static or dynamic library, and executables

3.2 or higher.

Deep learning applications in 8-bit integer precision

6.1, 6.3 or higher.

Deep learning applications in half-precision (16-bit floating point)

5.3, 6.0, 6.2 or higher.

If you specify custom compute capability, GPU Coder™ ignores this setting.

Dependencies

  • This parameter requires a GPU Coder license.

  • To enable this parameter, select Generate GPU code on the Code Generation pane.

Settings

5.0 (default) | 3.2 | 3.5 | 3.7 | 5.2 | 5.3 | 6.0 | ...

When developing CUDA applications, it is important to consider the compute capability of the target GPUs to ensure compatibility and optimize performance. With a lower compute capability, the generated code will be compatible with different GPU architectures but will not take advantage if latest architecture advancements resulting in reduced performance.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: GPUComputeCapability
Type: character vector
Value: '3.2' | '3.5' | '3.7' | '5.0' | '5.2' | '5.3' | '6.0' | '6.1' | '6.2' | '7.0' | '7.2' | '7.5' | '8.0' | | '8.3' | '8.6' | '8.7' | '8.9' | '9.0'
Default: '5.0'

Version History

Introduced in R2020b