pub struct RefBackend;Expand description
Pure Rust reference implementation of KernelBackend.
Used for CI testing and platforms where no hardware-accelerated backend is available.
Trait Implementations§
Source§impl KernelBackend for RefBackend
impl KernelBackend for RefBackend
Source§fn depthwise_conv2d(&mut self, params: DepthwiseConv2dParams<'_>) -> Status
fn depthwise_conv2d(&mut self, params: DepthwiseConv2dParams<'_>) -> Status
Execute a depthwise 2D convolution. Read more
Source§fn fully_connected(&mut self, params: FullyConnectedParams<'_>) -> Status
fn fully_connected(&mut self, params: FullyConnectedParams<'_>) -> Status
Execute a fully-connected layer. Read more
Source§fn add(&mut self, params: ElementwiseAddParams<'_>) -> Status
fn add(&mut self, params: ElementwiseAddParams<'_>) -> Status
Execute element-wise addition. Read more
Source§fn conv2d_scratch_size(
input_shape: [usize; 4],
weights_shape: [usize; 4],
output_shape: [usize; 4],
) -> usizewhere
Self: Sized,
fn conv2d_scratch_size(
input_shape: [usize; 4],
weights_shape: [usize; 4],
output_shape: [usize; 4],
) -> usizewhere
Self: Sized,
Returns the scratch buffer size in bytes required by
Self::conv2d. Read moreSource§fn depthwise_conv2d_scratch_size(
input_shape: [usize; 4],
weights_shape: [usize; 4],
output_shape: [usize; 4],
) -> usizewhere
Self: Sized,
fn depthwise_conv2d_scratch_size(
input_shape: [usize; 4],
weights_shape: [usize; 4],
output_shape: [usize; 4],
) -> usizewhere
Self: Sized,
Returns the scratch buffer size in bytes required by
Self::depthwise_conv2d.Source§fn softmax_scratch_size(num_classes: usize) -> usizewhere
Self: Sized,
fn softmax_scratch_size(num_classes: usize) -> usizewhere
Self: Sized,
Returns the scratch buffer size in bytes required by
Self::softmax.Auto Trait Implementations§
impl Freeze for RefBackend
impl RefUnwindSafe for RefBackend
impl Send for RefBackend
impl Sync for RefBackend
impl Unpin for RefBackend
impl UnsafeUnpin for RefBackend
impl UnwindSafe for RefBackend
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