pub struct StackedExpertLinear<B: Backend + BackendQuantMarlin> { /* private fields */ }Expand description
View into a single column-slice of a shared stacked GPTQ store.
Phase 3e/2: backed by a Box<dyn Linear<B>> produced by
B::make_stacked_expert_linear (CUDA: CudaMarlinStackedExpertLinear;
CPU: CpuGptqLinear over a sliced row range). The store itself is
Arc<B::GptqStore> so cloning a view is cheap; dropping all views
drops the underlying store.
Implementations§
Source§impl<B: Backend + BackendQuantMarlin> StackedExpertLinear<B>
impl<B: Backend + BackendQuantMarlin> StackedExpertLinear<B>
Sourcepub fn new(
stack: Arc<dyn MarlinExpertStack<B>>,
expert_offset: usize,
expert_n: usize,
) -> Result<Self>
pub fn new( stack: Arc<dyn MarlinExpertStack<B>>, expert_offset: usize, expert_n: usize, ) -> Result<Self>
Phase C step 4b: takes the trait-object MarlinExpertStack
directly (was Arc<B::GptqStore> + B::make_stacked_expert_linear).
pub fn new_with_bias( stack: Arc<dyn MarlinExpertStack<B>>, expert_offset: usize, expert_n: usize, bias: &[f32], ) -> Result<Self>
Trait Implementations§
Source§impl<B: Backend + BackendQuantMarlin> Linear<B> for StackedExpertLinear<B>
impl<B: Backend + BackendQuantMarlin> Linear<B> for StackedExpertLinear<B>
Auto Trait Implementations§
impl<B> !RefUnwindSafe for StackedExpertLinear<B>
impl<B> !UnwindSafe for StackedExpertLinear<B>
impl<B> Freeze for StackedExpertLinear<B>
impl<B> Send for StackedExpertLinear<B>
impl<B> Sync for StackedExpertLinear<B>
impl<B> Unpin for StackedExpertLinear<B>
impl<B> UnsafeUnpin for StackedExpertLinear<B>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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