pub struct Capabilities {
pub supports_fp16: bool,
pub supports_bf16: bool,
pub supports_fp8: bool,
pub tensor_cores: bool,
pub peer_access: bool,
pub unified_memory: bool,
pub cluster_launch: bool,
pub async_copy: bool,
pub max_threads_per_block: u32,
pub max_shared_mem_per_block: u32,
pub warp_size: u32,
}Expand description
Per-backend capability report.
A concrete backend populates this from its driver during
ComputeBackend::capabilities.
Consumers use it to decide whether a mixed-precision or Tensor-Core
path is available before issuing work.
The Default value is the conservative CPU profile: no
accelerated precisions, no Tensor Cores, no peer access, but generous
thread/shared-memory limits that any host can honour.
Fields§
§supports_fp16: boolNative FP16 (half precision) compute is available.
supports_bf16: boolNative BF16 (bfloat16) compute is available.
supports_fp8: boolFP8 (E4M3/E5M2) compute is available.
tensor_cores: boolDedicated matrix/Tensor-Core (WMMA / mma.sync) units are present.
peer_access: boolPeer-to-peer access between devices of this backend is possible.
unified_memory: boolUnified / managed memory (host and device share an address space).
cluster_launch: boolThread-block clusters (Hopper sm_90+) are supported.
async_copy: boolAsynchronous global→shared copy (cp.async, Ampere sm_80+).
max_threads_per_block: u32Maximum threads per block / workgroup.
Maximum shared / local memory per block in bytes.
warp_size: u32Warp / wavefront / subgroup width in lanes.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub const fn cpu() -> Self
pub const fn cpu() -> Self
Conservative capability profile for a pure-CPU reference backend.
No accelerated precisions or matrix units, but limits large enough that the consumer never rejects a launch for being “too big”.
Sourcepub const fn supports_mixed_precision(&self) -> bool
pub const fn supports_mixed_precision(&self) -> bool
Returns true if any reduced-precision compute path is available.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl Default for Capabilities
impl Default for Capabilities
Source§impl Display for Capabilities
impl Display for Capabilities
impl Eq for Capabilities
Source§impl PartialEq for Capabilities
impl PartialEq for Capabilities
Source§fn eq(&self, other: &Capabilities) -> bool
fn eq(&self, other: &Capabilities) -> bool
self and other values to be equal, and is used by ==.