pub struct CandleBackend { /* private fields */ }Expand description
Candle backend
Implementations§
Trait Implementations§
Source§impl ComputeBackend for CandleBackend
impl ComputeBackend for CandleBackend
Source§fn capabilities(&self) -> BackendCapabilities
fn capabilities(&self) -> BackendCapabilities
Get backend capabilities
Source§fn tensor_ops(&self) -> &dyn TensorOps
fn tensor_ops(&self) -> &dyn TensorOps
Get tensor operations interface
Source§fn tensor_factory(&self) -> &dyn TensorFactory
fn tensor_factory(&self) -> &dyn TensorFactory
Get tensor factory for creating tensors
Source§fn memory_manager(&self) -> &dyn DeviceMemoryManager
fn memory_manager(&self) -> &dyn DeviceMemoryManager
Get memory manager for this backend
Source§fn kernel_executor(&self) -> Option<&dyn KernelExecutor>
fn kernel_executor(&self) -> Option<&dyn KernelExecutor>
Get kernel executor (if backend supports custom kernels)
Source§fn kernel_ops(&self) -> Option<&dyn KernelOps>
fn kernel_ops(&self) -> Option<&dyn KernelOps>
Get LLM-specific kernel operations (if backend provides optimized impls). Read more
Source§fn initialize<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_device: &'life1 Device,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn initialize<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_device: &'life1 Device,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Initialize backend with device
Source§fn supports_device(&self, device: &Device) -> bool
fn supports_device(&self, device: &Device) -> bool
Check if backend supports specific device
Source§fn synchronize<'life0, 'life1, 'async_trait>(
&'life0 self,
_device: &'life1 Device,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn synchronize<'life0, 'life1, 'async_trait>(
&'life0 self,
_device: &'life1 Device,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Synchronize all pending operations
Source§fn status(&self) -> BackendStatus
fn status(&self) -> BackendStatus
Get backend status
Auto Trait Implementations§
impl !Freeze for CandleBackend
impl !RefUnwindSafe for CandleBackend
impl Send for CandleBackend
impl Sync for CandleBackend
impl Unpin for CandleBackend
impl UnsafeUnpin for CandleBackend
impl UnwindSafe for CandleBackend
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more