pub struct BackendMask(/* private fields */);Expand description
Backend kinds allowed to register in this process. A backend outside the
mask never runs any code, so a broken GPU driver can be kept out of a
worker entirely. CPU is always allowed; TRANSCRIBE_BACKENDS can only
narrow the mask.
Implementations§
Source§impl BackendMask
impl BackendMask
Sourcepub const CPU: BackendMask
pub const CPU: BackendMask
CPU plus host-memory accelerators (BLAS). Always implied.
Sourcepub const METAL: BackendMask
pub const METAL: BackendMask
Apple Metal.
Sourcepub const VULKAN: BackendMask
pub const VULKAN: BackendMask
Vulkan.
Sourcepub const CUDA: BackendMask
pub const CUDA: BackendMask
NVIDIA CUDA.
Sourcepub const ROCM: BackendMask
pub const ROCM: BackendMask
AMD ROCm / HIP.
Sourcepub const OTHER: BackendMask
pub const OTHER: BackendMask
Every backend without a dedicated bit (SYCL, OpenCL, RPC, …).
Sourcepub const ALL: BackendMask
pub const ALL: BackendMask
Everything. The default.
Sourcepub const fn for_backend(backend: Backend) -> BackendMask
pub const fn for_backend(backend: Backend) -> BackendMask
The smallest mask that can serve a model-load backend request
(Backend::Auto needs everything).
Sourcepub const fn from_bits(bits: u32) -> BackendMask
pub const fn from_bits(bits: u32) -> BackendMask
A mask from raw TRANSCRIBE_BACKEND_MASK_* bits.
Sourcepub const fn union(self, other: BackendMask) -> BackendMask
pub const fn union(self, other: BackendMask) -> BackendMask
Both masks’ backends.
Sourcepub const fn contains(self, other: BackendMask) -> bool
pub const fn contains(self, other: BackendMask) -> bool
Whether every backend in other is in self.
Trait Implementations§
Source§impl BitOr for BackendMask
impl BitOr for BackendMask
Source§type Output = BackendMask
type Output = BackendMask
The resulting type after applying the
| operator.Source§fn bitor(self, rhs: BackendMask) -> BackendMask
fn bitor(self, rhs: BackendMask) -> BackendMask
Performs the
| operation. Read moreSource§impl BitOrAssign for BackendMask
impl BitOrAssign for BackendMask
Source§fn bitor_assign(&mut self, rhs: BackendMask)
fn bitor_assign(&mut self, rhs: BackendMask)
Performs the
|= operation. Read moreSource§impl Clone for BackendMask
impl Clone for BackendMask
impl Copy for BackendMask
Source§impl Debug for BackendMask
impl Debug for BackendMask
Source§impl Default for BackendMask
impl Default for BackendMask
impl Eq for BackendMask
Source§impl Hash for BackendMask
impl Hash for BackendMask
Source§impl PartialEq for BackendMask
impl PartialEq for BackendMask
impl StructuralPartialEq for BackendMask
Auto Trait Implementations§
impl Freeze for BackendMask
impl RefUnwindSafe for BackendMask
impl Send for BackendMask
impl Sync for BackendMask
impl Unpin for BackendMask
impl UnsafeUnpin for BackendMask
impl UnwindSafe for BackendMask
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