pub enum GpuPreference {
BackendId {
backend: String,
id: usize,
},
PciBusId(String),
NameContains(String),
Partition(String),
}Variants§
BackendId
Match by provider backend and device id, e.g. “cuda:1”.
PciBusId(String)
Match by PCI bus id, e.g. “00000000:01:00.0”.
NameContains(String)
Match by case-insensitive substring in Device.name.
Partition(String)
Match by stable partition identifier (GPU UUID or MIG UUID).
Parsed from "mig:<id>" or "partition:<id>" selector strings.
The stored value is the portion after the prefix, matched
case-insensitively against Device.partition_id.
Implementations§
Trait Implementations§
Source§impl Clone for GpuPreference
impl Clone for GpuPreference
Source§fn clone(&self) -> GpuPreference
fn clone(&self) -> GpuPreference
Returns a duplicate of the value. Read more
1.0.0 · 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 GpuPreference
impl Debug for GpuPreference
Source§impl PartialEq for GpuPreference
impl PartialEq for GpuPreference
impl Eq for GpuPreference
impl StructuralPartialEq for GpuPreference
Auto Trait Implementations§
impl Freeze for GpuPreference
impl RefUnwindSafe for GpuPreference
impl Send for GpuPreference
impl Sync for GpuPreference
impl Unpin for GpuPreference
impl UnsafeUnpin for GpuPreference
impl UnwindSafe for GpuPreference
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