pub trait ParallelRoutedLayeredArchitecture<B, S>: RoutedLayeredArchitecture<B, S> + ParallelLayeredArchitecture<B, S>where
B: GroupedNeuralBackend,
S: RuntimeState<B>,{
// Required method
fn forward_unit_parallel_with_provider<P>(
&mut self,
group: usize,
index: usize,
unit: &mut Self::Unit,
hidden: &B::Tensor,
state: &mut S,
forward: &mut Self::ForwardContext,
pass: ExpertPass,
provider: &mut P,
parallel: &B::ParallelContext,
context: &<B::Tensor as Tensor>::Context,
) -> Result<B::Tensor, Self::Error>
where P: TensorParallelRoutedExpertProvider<B>,
P::Error: Display;
}Expand description
Tensor-parallel provider-aware unit execution.
Required Methods§
Sourcefn forward_unit_parallel_with_provider<P>(
&mut self,
group: usize,
index: usize,
unit: &mut Self::Unit,
hidden: &B::Tensor,
state: &mut S,
forward: &mut Self::ForwardContext,
pass: ExpertPass,
provider: &mut P,
parallel: &B::ParallelContext,
context: &<B::Tensor as Tensor>::Context,
) -> Result<B::Tensor, Self::Error>
fn forward_unit_parallel_with_provider<P>( &mut self, group: usize, index: usize, unit: &mut Self::Unit, hidden: &B::Tensor, state: &mut S, forward: &mut Self::ForwardContext, pass: ExpertPass, provider: &mut P, parallel: &B::ParallelContext, context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, Self::Error>
Executes one tensor-parallel unit through a runtime-supplied provider.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".