pub struct HardwareProfile {
pub platform: RuntimePlatform,
pub kernel_release: Option<String>,
pub logical_cpus: usize,
pub total_memory_bytes: Option<u64>,
pub gpus: Vec<GpuDevice>,
pub rocm_available: bool,
pub vulkan_available: bool,
pub graphics_driver: Option<String>,
pub diagnostics: Vec<String>,
}Fields§
§platform: RuntimePlatform§kernel_release: Option<String>§logical_cpus: usize§total_memory_bytes: Option<u64>§gpus: Vec<GpuDevice>§rocm_available: bool§vulkan_available: bool§graphics_driver: Option<String>§diagnostics: Vec<String>Implementations§
Source§impl HardwareProfile
impl HardwareProfile
pub fn detect() -> Self
Sourcepub fn recommended_backend(&self) -> RuntimeBackend
pub fn recommended_backend(&self) -> RuntimeBackend
Choose the strongest backend that has both observable host support and a pinned artifact. Unknown Windows GPU state deliberately falls back to CPU rather than guessing.
Trait Implementations§
Source§impl Clone for HardwareProfile
impl Clone for HardwareProfile
Source§fn clone(&self) -> HardwareProfile
fn clone(&self) -> HardwareProfile
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 moreSource§impl Debug for HardwareProfile
impl Debug for HardwareProfile
Source§impl<'de> Deserialize<'de> for HardwareProfile
impl<'de> Deserialize<'de> for HardwareProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HardwareProfile
Source§impl PartialEq for HardwareProfile
impl PartialEq for HardwareProfile
Source§impl Serialize for HardwareProfile
impl Serialize for HardwareProfile
impl StructuralPartialEq for HardwareProfile
Auto Trait Implementations§
impl Freeze for HardwareProfile
impl RefUnwindSafe for HardwareProfile
impl Send for HardwareProfile
impl Sync for HardwareProfile
impl Unpin for HardwareProfile
impl UnsafeUnpin for HardwareProfile
impl UnwindSafe for HardwareProfile
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.