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 41

kind​

Where the device sits relative to the host (DeviceKind): an integrated part shares the host's memory, a discrete one has its own, the CPU is the host itself. Unknown when the backend reports no kind.

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

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 50

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 54

sm_count​

std::int32_t sm_count = 0

SMs (CUDA) / compute units.

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

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 57

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 58

warp_size​

std::int32_t warp_size = 0

Warp/wave/subgroup width.

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

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 60

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 62

total_memory_bytes​

std::uint64_t total_memory_bytes = 0

Total device memory.

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

is_integrated​

bool is_integrated = false

The device's memory IS the host's RAM (a Jetson-class part): no separate heap, so the host's figures describe it too.

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

has_tensor_cores​

bool has_tensor_cores = false

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

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

supports_fp16​

bool supports_fp16 = false

native fp16 arithmetic

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

supports_bf16​

bool supports_bf16 = false

native bf16 arithmetic

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

supports_fp8_e4m3​

bool supports_fp8_e4m3 = false

native fp8 E4M3 arithmetic

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

prefix_continuation_bit_exact​

bool prefix_continuation_bit_exact = false

A prompt's last token yields the same logits, bit for bit, whether it is computed inside a multi-row prompt prefill or as a one-token step over a cache that already holds the rows before it. True where every kernel on that path runs one program regardless of the row count (the CPU); false where the kernel route keys on the shape (the GPU backends: a multi-row GEMM beside a one-row GEMV, a prefill attention tier beside a decode tier). A serving layer that must answer a repeated prompt byte-identically to its first answer reads this and, where it is false, computes the last prompt token as a one-token step in both shapes.

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

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 89