cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
cuda::device::compute_capability_t Struct Reference

A numeric designator of the computational capabilities of a CUDA device. More...

#include <device_properties.hpp>

Collaboration diagram for cuda::device::compute_capability_t:

Public Member Functions

constexpr unsigned major () const
 
unsigned constexpr minor () const
 
constexpr unsigned as_combined_number () const noexcept
 Produces a single-number representation of the compute capability. More...
 
constexpr bool is_valid () const noexcept
 
unsigned max_in_flight_threads_per_processor () const
 
memory::shared::size_t max_shared_memory_per_block () const
 
unsigned max_warp_schedulings_per_processor_cycle () const
 Some (of many) specific properties of GPUs with a given compute capability.
 
unsigned max_resident_warps_per_processor () const
 

Static Public Member Functions

static constexpr compute_capability_t from_combined_number (unsigned combined) noexcept
 Converts a single-number representation of a compute capability into a proper structured instance of this class. More...
 

Public Attributes

compute_architecture_t architecture
 The major capability designator.
 
unsigned minor_
 The minor designator, indicating mostly numeric choices of capabilities (e.g. More...
 

Detailed Description

A numeric designator of the computational capabilities of a CUDA device.

Note
The CUDA programming guide has tables (<a href="https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#features-and-technical-specifications-feature-support-per-compute-capability"this one and <a href="https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#features-and-technical-specifications-technical-specifications-per-compute-capability"this one) listing the specific features and capabilities for different CC values.

Member Function Documentation

◆ as_combined_number()

constexpr unsigned cuda::device::compute_capability_t::as_combined_number ( ) const
noexcept

Produces a single-number representation of the compute capability.

In certain contexts (e.g. compiler command-line parameters), compute capabilities are specified by a single number, e.g. 75 for major 7, minor 5. This perform one direction of the conversion; see also {from_combined_number}.

◆ from_combined_number()

static constexpr compute_capability_t cuda::device::compute_capability_t::from_combined_number ( unsigned  combined)
staticnoexcept

Converts a single-number representation of a compute capability into a proper structured instance of this class.

In certain contexts (e.g. compiler command-line parameters), compute capabilities are specified by a single number, e.g. 75 for major 7, minor 5. This perform one direction of the conversion; see also {as_combined_number}.

◆ is_valid()

constexpr bool cuda::device::compute_capability_t::is_valid ( ) const
noexcept
Returns
true if there actually are any GPUs listed with this combination of major and minor compute capability numbers

◆ max_in_flight_threads_per_processor()

unsigned cuda::device::compute_capability_t::max_in_flight_threads_per_processor ( ) const
Note
: Based on _ConvertSMVer2Cores() in the CUDA samples helper code

◆ max_shared_memory_per_block()

memory::shared::size_t cuda::device::compute_capability_t::max_shared_memory_per_block ( ) const
Note
On some architectures, the shared memory / L1 balance is configurable, so that this may not be the current, actual maximum a specific kernel can use at a specific point.

Member Data Documentation

◆ minor_

unsigned cuda::device::compute_capability_t::minor_

The minor designator, indicating mostly numeric choices of capabilities (e.g.

how many SMs, homw much memory, whether the numbers of functional units will be skewed more towards double-precision or integer operations etc.)


The documentation for this struct was generated from the following file: