Skip to main content

ClikaRT::device::DeviceProperties

struct

Header: ClikaRT/compute/device_properties.h

Static capabilities of a compute device: what a hand-written kernel needs to size its launch and pick a code path: SM/core count, compute capability, warp size, shared-memory budget, and which dtypes the hardware accelerates. Query it once (e.g. in a custom op's setup) and cache the result.

A device's static capabilities. A plain value type; copy it freely.

Field meanings are normalized across backends: sm_count is SMs on CUDA, compute units elsewhere; warp_size is the warp/wave/subgroup width (32 on NVIDIA); compute_capability_* is the CUDA SM version (8, 6 → SM 8.6) or the nearest equivalent generation tag on other backends. A field the backend does not report is left 0 / false / empty.

Data members

name

std::string name

Human-readable device name.

Declared in ClikaRT/compute/device_properties.h, line 27

driver_version

std::string driver_version

The installed driver's version as the backend reports it (CUDA: the driver's CUDA version, for example "13.3"; Vulkan: the vendor driver version). Empty when the device has no driver notion (the CPU).

Declared in ClikaRT/compute/device_properties.h, line 31

backend_runtime_version

std::string backend_runtime_version

The backend runtime this library loaded for the device (CUDA: the CUDA runtime version it carries, for example "12.6"; Vulkan: the Vulkan API version in use). Empty when not applicable.

Declared in ClikaRT/compute/device_properties.h, line 35

sm_count

std::int32_t sm_count = 0

SMs (CUDA) / compute units.

Declared in ClikaRT/compute/device_properties.h, line 37

compute_capability_major

std::int32_t compute_capability_major = 0

e.g. 8 for SM 8.6.

Declared in ClikaRT/compute/device_properties.h, line 38

compute_capability_minor

std::int32_t compute_capability_minor = 0

e.g. 6 for SM 8.6.

Declared in ClikaRT/compute/device_properties.h, line 39

warp_size

std::int32_t warp_size = 0

Warp/wave/subgroup width.

Declared in ClikaRT/compute/device_properties.h, line 40

max_threads_per_block

std::int32_t max_threads_per_block = 0

per-block/workgroup thread ceiling

Declared in ClikaRT/compute/device_properties.h, line 41

shared_memory_per_block_bytes

std::uint32_t shared_memory_per_block_bytes = 0

Per-block shared memory.

Declared in ClikaRT/compute/device_properties.h, line 43

total_memory_bytes

std::uint64_t total_memory_bytes = 0

Total device memory.

Declared in ClikaRT/compute/device_properties.h, line 44

has_tensor_cores

bool has_tensor_cores = false

Matrix/tensor engine present (TC/XMX/…).

Declared in ClikaRT/compute/device_properties.h, line 46

supports_fp16

bool supports_fp16 = false

native fp16 arithmetic

Declared in ClikaRT/compute/device_properties.h, line 47

supports_bf16

bool supports_bf16 = false

native bf16 arithmetic

Declared in ClikaRT/compute/device_properties.h, line 48

supports_fp8_e4m3

bool supports_fp8_e4m3 = false

native fp8 E4M3 arithmetic

Declared in ClikaRT/compute/device_properties.h, line 49

unavailable_reason

std::string unavailable_reason

Why the device, though present, cannot run work under this build (for example a CUDA build whose kernels carry no code for the device's compute capability). Empty when the device serves; a request placed on a device carrying a reason fails with the same text.

Declared in ClikaRT/compute/device_properties.h, line 55