pub enum Linear<B: Backend> {
Dense(Tensor<B, 2>),
Quant(Box<dyn QuantLinearOp<B>>),
}Expand description
A linear layer weight: dense tensor (portable path) or packed quant blocks bound to a fused device kernel.
Variants§
Dense(Tensor<B, 2>)
Portable path: [n_out, k] dense tensor, burn matmul.
Quant(Box<dyn QuantLinearOp<B>>)
Fast path: packed weight + backend-specific kernel dispatch.
Implementations§
Auto Trait Implementations§
impl<B> !RefUnwindSafe for Linear<B>
impl<B> !UnwindSafe for Linear<B>
impl<B> Freeze for Linear<B>where
<B as BackendTypes>::FloatTensorPrimitive: Freeze,
<B as BackendTypes>::QuantizedTensorPrimitive: Freeze,
impl<B> Send for Linear<B>
impl<B> Sync for Linear<B>
impl<B> Unpin for Linear<B>where
<B as BackendTypes>::FloatTensorPrimitive: Unpin,
<B as BackendTypes>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for Linear<B>where
<B as BackendTypes>::FloatTensorPrimitive: UnsafeUnpin,
<B as BackendTypes>::QuantizedTensorPrimitive: UnsafeUnpin,
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