pub enum ComputeBackend {
Cpu,
Wgpu,
Cuda {
device_ordinal: usize,
},
Auto,
}Expand description
User-facing execution backend preference.
Variants§
Cpu
Always execute on the host reference backend.
Wgpu
Use the portable WGPU path where supported by the operation.
Cuda
Use the native CUDA path on this device ordinal.
Auto
Select the best backend that initializes successfully.
Implementations§
Source§impl ComputeBackend
impl ComputeBackend
Sourcepub fn resolve(&self) -> Result<(Self, String), AcceleratorError>
pub fn resolve(&self) -> Result<(Self, String), AcceleratorError>
Resolve Auto and report both the selected backend and why.
CUDA fallback is attempted only here, during initialization. Execution errors are intentionally never converted into a silent CPU fallback.
Trait Implementations§
Source§impl Clone for ComputeBackend
impl Clone for ComputeBackend
Source§fn clone(&self) -> ComputeBackend
fn clone(&self) -> ComputeBackend
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 ComputeBackend
impl Debug for ComputeBackend
impl Eq for ComputeBackend
Source§impl PartialEq for ComputeBackend
impl PartialEq for ComputeBackend
impl StructuralPartialEq for ComputeBackend
Auto Trait Implementations§
impl Freeze for ComputeBackend
impl RefUnwindSafe for ComputeBackend
impl Send for ComputeBackend
impl Sync for ComputeBackend
impl Unpin for ComputeBackend
impl UnsafeUnpin for ComputeBackend
impl UnwindSafe for ComputeBackend
Blanket Implementations§
Source§impl<T> AccumulatePathExt for T
impl<T> AccumulatePathExt for T
fn accumulate_path<O, I>(path: I) -> Owhere
O: Orientation,
I: IntoIterator<Item = O>,
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