pub struct CpuBackend { /* private fields */ }Expand description
The CPU backend, which owns its threads.
Implementations§
Trait Implementations§
Source§impl Backend for CpuBackend
impl Backend for CpuBackend
Source§fn weight_bytes(&self, w: &Weights) -> usize
fn weight_bytes(&self, w: &Weights) -> usize
Bytes the weights take on the device.
Source§fn plan_bytes(&self, p: &CpuPlan) -> usize
fn plan_bytes(&self, p: &CpuPlan) -> usize
Bytes a plan takes on the device, its arena and staging buffers.
Source§fn upload(&self, tensors: &[HostTensor<'_>], graph: &Graph) -> Result<Weights>
fn upload(&self, tensors: &[HostTensor<'_>], graph: &Graph) -> Result<Weights>
Converts a checkpoint’s tensors, indexed as the graph’s weights are. Read more
Auto Trait Implementations§
impl !Freeze for CpuBackend
impl !RefUnwindSafe for CpuBackend
impl !UnwindSafe for CpuBackend
impl Send for CpuBackend
impl Sync for CpuBackend
impl Unpin for CpuBackend
impl UnsafeUnpin for CpuBackend
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