Skip to main content

RealtimeModelConstructionMechanisms

Trait RealtimeModelConstructionMechanisms 

Source
pub trait RealtimeModelConstructionMechanisms<A, B>
where B: SubmissionBackend<Executor = <<B as NeuralBackend>::Tensor as Tensor>::Context>, A: LayeredArchitecture<B, Self::State>, Self::State: RuntimeState<B>, Self::ResidentPolicy: LayerwisePolicy<B, A::Unit, Error = Self::PolicyError>, Self::BoundedPolicy: LayerwisePolicy<B, A::Unit, Error = Self::PolicyError>,
{ type State: RuntimeState<B>; type PolicyError; type ResidentPolicy: LayerwisePolicy<B, A::Unit, Error = Self::PolicyError>; type BoundedPolicy: LayerwisePolicy<B, A::Unit, Error = Self::PolicyError>; type Error; // Required methods fn prepare_resident_materialization( &mut self, architecture: &mut A, units: &mut [A::Unit], source_architecture: Option<&mut A>, source_units: Option<&mut [A::Unit]>, tasks: &[RealtimeMaterializationTask], selected: &SelectedRealtimeRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<(), Self::Error>; fn resident_policy( &mut self, architecture: &mut A, units: Vec<A::Unit>, selected: &SelectedRealtimeRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<RealizedRealtimePolicy<Self::ResidentPolicy>, Self::Error>; fn bounded_policy( &mut self, architecture: &mut A, source_architecture: Option<&mut A>, tasks: &[RealtimeMaterializationTask], selected: &SelectedRealtimeRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<RealizedRealtimePolicy<Self::BoundedPolicy>, Self::Error>; fn realize_state( &mut self, selected: &SelectedRealtimeStateRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<RealizedRealtimeState<Self::State>, Self::Error>; }
Expand description

Generic mechanisms used only to materialize and store a selected model.

Required Associated Types§

Source

type State: RuntimeState<B>

Concrete architecture state realization.

Source

type PolicyError

Shared resident/bounded policy failure.

Source

type ResidentPolicy: LayerwisePolicy<B, A::Unit, Error = Self::PolicyError>

Fully resident unit storage.

Source

type BoundedPolicy: LayerwisePolicy<B, A::Unit, Error = Self::PolicyError>

Host-windowed or disk-streamed unit storage.

Source

type Error

Mechanism failure.

Required Methods§

Source

fn prepare_resident_materialization( &mut self, architecture: &mut A, units: &mut [A::Unit], source_architecture: Option<&mut A>, source_units: Option<&mut [A::Unit]>, tasks: &[RealtimeMaterializationTask], selected: &SelectedRealtimeRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<(), Self::Error>

Materializes and binds every resident static/unit component exactly once.

Source

fn resident_policy( &mut self, architecture: &mut A, units: Vec<A::Unit>, selected: &SelectedRealtimeRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<RealizedRealtimePolicy<Self::ResidentPolicy>, Self::Error>

Builds fully resident storage around populated units.

Source

fn bounded_policy( &mut self, architecture: &mut A, source_architecture: Option<&mut A>, tasks: &[RealtimeMaterializationTask], selected: &SelectedRealtimeRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<RealizedRealtimePolicy<Self::BoundedPolicy>, Self::Error>

Builds selected bounded storage without eagerly constructing every unit.

Source

fn realize_state( &mut self, selected: &SelectedRealtimeStateRealization, context: &<<B as NeuralBackend>::Tensor as Tensor>::Context, ) -> Result<RealizedRealtimeState<Self::State>, Self::Error>

Realizes exact selected state components and placements.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§