pub enum DeviceType {
Cpu,
Cuda,
Rocm,
CoreMl,
Mlx,
WebGpu,
Qnn,
OpenVino,
Custom(u32),
}Expand description
A class of compute device / execution backend.
Variants§
Cpu
Cuda
Rocm
CoreMl
Mlx
WebGpu
Qnn
OpenVino
Custom(u32)
Vendor / experimental backend keyed by an opaque id.
Implementations§
Source§impl DeviceType
impl DeviceType
Sourcepub fn trace_name(self) -> Cow<'static, str>
pub fn trace_name(self) -> Cow<'static, str>
The canonical lower-case name used in traces and diagnostics.
One owner for these spellings so a trace produced by any execution
provider labels its device the same way. Custom keeps its opaque id
rather than collapsing every vendor backend to one indistinguishable
name.
Sourcepub fn is_host_accessible(self) -> bool
pub fn is_host_accessible(self) -> bool
Whether tensors on this device share the host address space and can be accessed by CPU code without an explicit copy.
Trait Implementations§
Source§impl Clone for DeviceType
impl Clone for DeviceType
Source§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
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 moreimpl Copy for DeviceType
Source§impl Debug for DeviceType
impl Debug for DeviceType
impl Eq for DeviceType
Source§impl Hash for DeviceType
impl Hash for DeviceType
Source§impl PartialEq for DeviceType
impl PartialEq for DeviceType
impl StructuralPartialEq for DeviceType
Auto Trait Implementations§
impl Freeze for DeviceType
impl RefUnwindSafe for DeviceType
impl Send for DeviceType
impl Sync for DeviceType
impl Unpin for DeviceType
impl UnsafeUnpin for DeviceType
impl UnwindSafe for DeviceType
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