pub struct DeviceCapabilities {
pub name: String,
pub total_memory: usize,
pub available_memory: usize,
pub supports_f16: bool,
pub supports_bf16: bool,
pub supports_tensor_cores: bool,
pub max_threads_per_block: u32,
pub max_shared_memory_per_block: usize,
pub multiprocessor_count: u32,
pub compute_capability: (u32, u32),
}Expand description
GPU device capabilities.
A plain data holder — nothing in this module manufactures values for it.
crate::occupancy derives real crate::occupancy::SmResourceLimits
from whatever is put here; populating it with honest numbers (e.g. from
scirs2_core::gpu::GpuContext::backend() plus documented per-vendor
specs) is the caller’s responsibility.
Fields§
§name: StringDevice name
total_memory: usizeTotal memory in bytes
available_memory: usizeAvailable memory in bytes
supports_f16: boolSupports half precision (f16)
supports_bf16: boolSupports bfloat16
supports_tensor_cores: boolSupports tensor cores
max_threads_per_block: u32Maximum threads per block
Maximum shared memory per block
multiprocessor_count: u32Number of streaming multiprocessors
compute_capability: (u32, u32)Compute capability (major, minor)
Trait Implementations§
Source§impl Clone for DeviceCapabilities
impl Clone for DeviceCapabilities
Source§fn clone(&self) -> DeviceCapabilities
fn clone(&self) -> DeviceCapabilities
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DeviceCapabilities
impl RefUnwindSafe for DeviceCapabilities
impl Send for DeviceCapabilities
impl Sync for DeviceCapabilities
impl Unpin for DeviceCapabilities
impl UnsafeUnpin for DeviceCapabilities
impl UnwindSafe for DeviceCapabilities
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more